/home/coin/SVN-release/OS-1.0.0/OS/src/OSCommonInterfaces/OSExpressionTree.h

Go to the documentation of this file.
00001 
00017 #ifndef EXPRESSIONTREE_H
00018 #define EXPRESSIONTREE_H 
00019 
00020 #include "OSnLNode.h"
00021 #include <vector>
00022 #include <map>
00023 #include<cppad/cppad.hpp>
00024 using CppAD::Parameter;
00025 
00035 class OSExpressionTree{  
00036 
00037 public: 
00038         
00042         OSnLNode *m_treeRoot;
00043         
00047         OSExpressionTree();
00048 
00052         ~OSExpressionTree();
00053         
00066         double calculateFunction( double *x, bool new_x);
00067         
00068 
00077         std::vector<OSnLNode*> getPrefixFromExpressionTree();
00078         
00087         std::vector<OSnLNode*> getPostfixFromExpressionTree();
00088         
00089 
00090         
00097         std::map<int, int> *mapVarIdx;
00098         
00107         std::map<int, int> *getVariableIndiciesMap();
00111         bool  m_bIndexMapGenerated;
00112         
00117         bool bCppADMustReTape;
00118 
00119         
00120 private:
00121         
00125         std::map<int, int>::iterator m_mPosVarIdx; 
00126         
00130         CppAD::AD<double> m_CppADTape;
00131         
00132         
00136         double m_dTreeRootValue;
00137         
00138 };//end OSExpressionTree
00139 
00140 
00141 
00142 
00143 #endif
00144 

Generated on Thu May 15 22:15:04 2008 by  doxygen 1.4.7