Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:51

0001 #ifndef ATOOLS_Math_Variable_H
0002 #define ATOOLS_Math_Variable_H
0003 
0004 #include "ATOOLS/Org/Getter_Function.H"
0005 #include "ATOOLS/Math/Vector.H"
0006 #include <string>
0007 
0008 namespace ATOOLS {
0009 
0010   class Algebra_Interpreter;
0011 
0012   template <class ValueType>
0013   class Variable_Base {
0014   public:
0015 
0016     typedef ValueType Value_Type;
0017 
0018   protected:
0019     
0020     std::string m_name, m_idname, m_selectorid;
0021 
0022   public:
0023 
0024     // constructors
0025     Variable_Base(const std::string &name,
0026           const std::string &idname="");
0027 
0028     // destructor
0029     virtual ~Variable_Base();
0030 
0031     // member functions
0032     virtual bool Init(const std::string &name="");
0033 
0034     const std::string &Name() const;
0035     const std::string &IDName() const;
0036 
0037     std::string SelectorID() const;
0038 
0039     Value_Type operator()(const Vec3D *vectors,const int &n=1) const;
0040     Value_Type operator()(const Vec4D *vectors,const int &n=1) const;
0041 
0042     virtual Value_Type Value(const Vec3D *vectors,const int &n=1) const;
0043     virtual Value_Type Value(const Vec4D *vectors,const int &n=1) const;
0044 
0045     virtual Algebra_Interpreter *GetInterpreter() const;
0046 
0047     static void ShowVariables(const int mode=1);
0048 
0049   };
0050 
0051   typedef Getter_Function<Variable_Base<double>,std::string> Variable_Getter;
0052 
0053 } // end of namespace ATOOLS
0054 
0055 #endif