00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _FUNC_TERM_H
00011 #define _FUNC_TERM_H
00012
00013 #include "../external/muparser/muParser.h"
00014 class FuncTerm
00015 {
00016 public:
00017 FuncTerm();
00018 ~FuncTerm();
00023 double operator() ( const double* S, double t ) const;
00024 const FuncTerm& operator=( const FuncTerm& other );
00025
00026 void evalPool( double* s, double t ) const;
00027
00033 void setReactantIndex( const vector< unsigned int >& mol );
00034 const vector< unsigned int >& getReactantIndex() const;
00035 const string& getExpr() const;
00036 void setExpr( const string& e );
00037 const unsigned int getTarget() const;
00038 void setTarget( unsigned int tgt );
00039 private:
00040 double* args_;
00041
00042 vector< unsigned int > reactantIndex_;
00043 mu::Parser parser_;
00044 string expr_;
00045 unsigned int target_;
00046 };
00047
00048 #endif // _FUNC_TERM_H