indii/fmri/neural/MultiSeedNeuralModel.hpp

00001 #ifndef INDII_ML_ODE_MULTISEEDNEURALMODEL_HPP
00002 #define INDII_ML_ODE_MULTISEEDNEURALMODEL_HPP
00003 
00004 #include "indii/ml/aux/vector.hpp"
00005 #include "indii/ml/aux/matrix.hpp"
00006 #include "indii/ml/ode/DifferentialModel.hpp"
00007 
00008 namespace indii {
00009   namespace fmri {
00010     namespace neural {
00011 
00012 /**
00013  * Multi-seed differential %model.
00014  *
00015  * @author Lawrence Murray <lawrence@indii.org>
00016  * @version $Rev: 285 $
00017  * @date $Date: 2007-07-20 17:25:40 +0100 (Fri, 20 Jul 2007) $
00018  *
00019  * Neural activities of \f$N\f$ seeds \f$\mathbf{x}\f$ are related
00020  * according to the differential system:
00021  *
00022  * \f[
00023  *   \frac{d\mathbf{x}}{dt} = A\mathbf{x}
00024  * \f]
00025  *
00026  * where \f$A\f$ is an \f$N \times N\f$ matrix of efficacies between
00027  * seeds.
00028  */
00029 class MultiSeedNeuralModel : public indii::ml::ode::DifferentialModel {
00030 public:
00031   /**
00032    * Construct new %model with given number of seeds. The efficacy
00033    * matrix is uninitialised.
00034    *
00035    * @param N \f$N\f$; the number of seeds.
00036    */
00037   MultiSeedNeuralModel(const unsigned int N);
00038 
00039   /**
00040    * Construct new %model with given efficacy matrix.
00041    *
00042    * @param A \f$A\f$; efficacies between seeds, assumed to be \f$N
00043    * \times N\f$ in size.
00044    */
00045   MultiSeedNeuralModel(const indii::ml::aux::matrix& A);
00046 
00047   /**
00048    * Destructor.
00049    */
00050   virtual ~MultiSeedNeuralModel();
00051 
00052   /**
00053    * Set all efficacies.
00054    *
00055    * @param A \f$A\f$; efficacies between seeds, must be \f$N \times
00056    * N\f$ in size.
00057    */
00058   void setEfficacies(const indii::ml::aux::matrix& A);
00059 
00060   /**
00061    * Set the efficacy between two seeds.
00062    *
00063    * @param i \f$i\f$; index of the affected seed.
00064    * @param j \f$j\f$; index of the affecting seed.
00065    * @param A_ij \f$A_{ij}\f$; efficacy of seed \f$j\f$ on seed
00066    * \f$i\f$.
00067    */
00068   void setEfficacy(const unsigned int i, const unsigned int j,
00069       const double A_ij);
00070 
00071   /**
00072    * @see indii::ml::ode::DifferentialModel
00073    */
00074   virtual void calculateDerivatives(double t, const double y[], double dydt[]);
00075 
00076 private:
00077   /**
00078    * \f$N\f$n; the number of seeds in the model.
00079    */
00080   const unsigned int N;
00081 
00082   /**
00083    * \f$A\f$; the efficacy matrix.
00084    */
00085   indii::ml::aux::matrix A;
00086 
00087 };
00088 
00089     }
00090   }
00091 }
00092 
00093 #endif

Generated on Tue Oct 9 22:02:07 2007 for fmrii fMRI Modelling Library by  doxygen 1.5.2