Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

odesol.h

Go to the documentation of this file.
00001 
00002 // FILE odesol.h 
00003 
00004 
00005 #ifndef INCLUDED_SOLUTION
00006 #define INCLUDED_SOLUTION
00007 
00008 
00009 #include <assert.h>
00010 #include "vnodecnf.h"
00011 
00012 
00025 class SOLUTION 
00026 {
00027 
00028 public:
00029   
00035   SOLUTION( int n );
00036 
00038   int GetDim() const;
00039   
00046   void SetTcur( double t );
00047   
00055   void SetTightEncl( const INTERVAL_VECTOR & Y );
00056   
00065   void SetInitEncl( const INTERVAL_VECTOR & Y );
00066   
00072   double GetTcur() const;
00073   
00080   double GetTprev() const; 
00081   
00086   const INTERVAL_VECTOR & GetTightEncl() const; 
00087   
00092   const INTERVAL_VECTOR & GetInitEncl() const; 
00093 
00098   SOLUTION & operator = ( const SOLUTION & S);
00099   
00101   virtual ~SOLUTION(); 
00102 
00103 private:
00104 
00106   double tCur, tPrev;
00107   
00109   //point, tCur
00110   INTERVAL_VECTOR Ytight; 
00111   
00113   INTERVAL_VECTOR Yinit; 
00114   
00115 };
00116 
00117 
00119 typedef SOLUTION*  PtrSolution;  
00120 
00121 
00122 inline SOLUTION :: SOLUTION( int n ) : tCur(0), tPrev(0)
00123 { 
00124   assert( n>0 ); 
00125   
00126   Resize( Ytight, n ); 
00127   Resize( Yinit, n ); 
00128 }
00129 
00130 
00131 inline void SOLUTION :: SetTcur( double t )  
00132 { 
00133   tPrev = tCur;
00134   tCur = t;
00135 }
00136 
00137 inline void SOLUTION :: SetTightEncl( const INTERVAL_VECTOR & Y ) 
00138 { 
00139   assert( GetDim()==Dimension(Y) );
00140   Ytight = Y; 
00141 }
00142 
00143 
00144 inline void SOLUTION :: SetInitEncl( const INTERVAL_VECTOR & Y ) 
00145 { 
00146   assert( GetDim()==Dimension(Y) );
00147   Yinit = Y; 
00148 }
00149 
00150 
00151 inline double SOLUTION :: GetTcur() const    
00152 { 
00153   return tCur; 
00154 }
00155 
00156 
00157 inline double SOLUTION :: GetTprev() const    
00158 { 
00159   return tPrev; 
00160 }
00161 
00162 
00163 inline const INTERVAL_VECTOR & SOLUTION :: GetTightEncl() const 
00164 { 
00165   assert(Dimension(Ytight)!=0);
00166   return Ytight; 
00167 }
00168 
00169 
00170 inline const INTERVAL_VECTOR & SOLUTION :: GetInitEncl() const 
00171 { 
00172   return Yinit; 
00173 }
00174 
00175 
00176 inline SOLUTION :: ~SOLUTION()
00177 {
00178   ;
00179 }
00180 
00181 
00182 inline int SOLUTION :: GetDim() const
00183 {
00184   return Dimension(Ytight);
00185 }
00186 
00187 
00188 #endif

Generated at Sun Oct 14 12:45:40 2001 for VNODE by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000