indii/ml/ode/FunctionModel.hpp

00001 #ifndef INDII_ML_ODE_FUNCTIONMODEL_HPP
00002 #define INDII_ML_ODE_FUNCTIONMODEL_HPP
00003 
00004 #include "boost/serialization/serialization.hpp"
00005 
00006 namespace indii {
00007   namespace ml {
00008     namespace ode {
00009 
00010 /**
00011  * Function specification. This class encapsulates a time-dependent
00012  * function. Instantiating an object of a class derived from this is
00013  * one way to supply a function to a FunctionCollection object. The
00014  * other is to define a static function of type f_t().
00015  */
00016 class FunctionModel {
00017 public:
00018   /**
00019    * Destructor.
00020    */
00021   virtual ~FunctionModel();
00022 
00023   /**
00024    * Evaluate the function.
00025    *
00026    * @param t The time.
00027    * @param y State variable values at time t.
00028    *
00029    * @return The calculated value of the function given the arguments.
00030    */
00031   virtual double evaluate(const double t, const double y[]) = 0;
00032 
00033 private:
00034   /**
00035    * Serialize, or restore from serialization.
00036    */
00037   template<class Archive>
00038   void serialize(Archive& ar, const unsigned int version);
00039 
00040   /*
00041    * Boost.Serialization requirements.
00042    */
00043   friend class boost::serialization::access;
00044 
00045 };
00046 
00047     }
00048   }
00049 }
00050 
00051 template<class Archive>
00052 void indii::ml::ode::FunctionModel::serialize(Archive& ar,
00053     const unsigned int version) {
00054   //
00055 }
00056 
00057 #endif

Generated on Wed Dec 17 15:11:57 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3