Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:17

0001 #include "CommonTools/Utils/interface/FormulaEvaluator.h"
0002 #include <iostream>
0003 #include <vector>
0004 
0005 int main(int argc, char** argv) {
0006   while (true) {
0007     std::cout << ">type in formula\n>" << std::flush;
0008 
0009     std::string form;
0010     std::cin >> form;
0011 
0012     reco::FormulaEvaluator eval(form);
0013 
0014     std::vector<double> x;
0015     std::vector<double> v;
0016 
0017     std::cout << eval.evaluate(x, v) << std::endl;
0018   }
0019 
0020   return 0;
0021 }