1#include "FunctionSet.h"
6FunctionSet::FunctionSet()
10bool FunctionSet::initialize(StateP state)
15 mAllFunctions.clear();
18 FunctionP func = (FunctionP) (
new Add);
19 mAllFunctions[func->getName()] = func;
21 func = (FunctionP) (
new Sub);
22 mAllFunctions[func->getName()] = func;
24 func = (FunctionP) (
new Mul);
25 mAllFunctions[func->getName()] = func;
27 func = (FunctionP) (
new Div);
28 mAllFunctions[func->getName()] = func;
30 func = (FunctionP) (
new Sqrt);
31 mAllFunctions[func->getName()] = func;
33 func = (FunctionP) (
new Exp);
34 mAllFunctions[func->getName()] = func;
36 func = (FunctionP) (
new Ln);
37 mAllFunctions[func->getName()] = func;
39 func = (FunctionP) (
new Sin);
40 mAllFunctions[func->getName()] = func;
42 func = (FunctionP) (
new Cos);
43 mAllFunctions[func->getName()] = func;
45 func = (FunctionP) (
new Step);
46 mAllFunctions[func->getName()] = func;
48 func = (FunctionP)(
new Pos);
49 mAllFunctions[func->getName()] = func;
51 func = (FunctionP)(
new Min);
52 mAllFunctions[func->getName()] = func;
54 func = (FunctionP)(
new Max);
55 mAllFunctions[func->getName()] = func;
64 func_iter iter = mAllFunctions.find(name);
66 if(iter == mAllFunctions.end())
69 vFunctions.push_back(iter->second);
70 mFunctionSet[iter->first] = (uint) vFunctions.size() - 1;
std::map< std::string, unsigned int > mFunctionSet
map of indexes of active (actual used) functions
bool addFunction(std::string name)