1 #include <utl/Function.h>
3 #include <utl/ExpressionParser.h>
4 #include <utl/AugerUnits.h>
5 #include <utl/SymbolTable.h>
13 Function::Function(
const std::string&
function,
14 const std::vector<std::string>& vars)
15 : fFunction(function) {
17 for (
const auto &v : vars) {
25 const std::string& var)
26 : fFunction(function) {
39 err <<
"Number of input variables " << 1 <<
" is different from number of function parameters " <<
fVariableNames.size() <<
" for function \'" <<
fFunction <<
"\'";
53 err <<
"Number of input variables " << vars.size() <<
" is different from number of function parameters " <<
fVariableNames.size() <<
" for function \'" <<
fFunction <<
"\'";
58 for (
const auto &v : vars) {
double operator()() const
Exception for errors encountered when parsing XML.
void SetVariable(const std::string &name, const double &v)
std::map< std::string, double > SymbolTable
std::vector< std::string > fVariableNames
utl::ExpressionParser< MathExpressionGrammar, AugerUnits > FunctionParser
#define ERROR(message)
Macro for logging error messages.