derivativevector.h

Go to the documentation of this file.
00001 #ifndef  __derivativevector_h
00002 #define  __derivativevector_h
00003 
00004 #include  "numfixarray.h"
00005 
00006 /*--------------------------------------------------------*/
00007 
00008 namespace Gascoigne
00009 {
00010 class DerivativeVector : public numfixarray<6,double>
00011 {
00012  private:
00013   std::map<std::string,double> _M;
00014 
00015  public:
00016 
00017   double m() const { return (*this)[0]; }
00018   double x() const { return (*this)[1]; }
00019   double y() const { return (*this)[2]; }
00020   double z() const { return (*this)[3]; }
00021   double n() const { return (*this)[4]; }
00022   double D() const { return (*this)[5]; }  // fuer Laplace
00023 
00024   double& m() { return (*this)[0]; }
00025   double& x() { return (*this)[1]; }
00026   double& y() { return (*this)[2]; }
00027   double& z() { return (*this)[3]; }
00028   double& n() { return (*this)[4]; }
00029   double& D() { return (*this)[5]; }
00030 
00031   double aux(const std::string &name) const
00032     {
00033       std::map<std::string,double>::const_iterator p = _M.find(name);
00034       if(p==_M.end())
00035         {
00036           std::cerr << name << " not found!" << std::endl;
00037           abort();
00038         }
00039       return p->second;
00040     }
00041 
00042   double &aux(const std::string &name) { return _M[name]; }
00043 
00044 };
00045 }
00046 
00047 /*--------------------------------------------------------*/
00048 
00049 #endif

Generated on Thu Sep 14 10:34:34 2006 for Gascoigne by  doxygen 1.4.7