Miind
QifOdeSystem.cpp
Go to the documentation of this file.
1 // Copyright (c) 2005 - 2014 Marc de Kamps
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 //
6 // * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 // * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation
8 // and/or other materials provided with the distribution.
9 // * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software
10 // without specific prior written permission.
11 //
12 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
14 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
15 // USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
16 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 //
18 // If you use this software in work leading to a scientific publication, you should include a reference there to
19 // the 'currently valid reference', which can be found at http://miind.sourceforge.net
20 #include <cassert>
21 #include "../NumtoolsLib/NumtoolsLib.h"
22 #include "InputParameterSet.hpp"
23 #include "MuSigma.hpp"
24 #include "QifOdeSystem.hpp"
25 #include "GeomLibException.hpp"
26 
27 using namespace GeomLib;
28 
30 (
31  const SpikingQifNeuralDynamics& dyn
32 ):
34 (
35  dyn
36 ),
37 _par_qif(dyn.ParQif())
38 {
39  _t_current = 0.0;
40 }
41 
44 (
45  sys
46 ),
47 _par_qif(sys._par_qif)
48 {
49 }
50 
52 {
53 }
54 
56 (
57  Time t
58 )
59 {
60  if ( ! NumtoolsLib::IsApproximatelyEqualTo(t, _t_step, 1e-9 ) )
61  throw GeomLibException("QIFOdeSystem is designed to only have one fixed time step");
62 
63  StoreInQueue();
64  RetrieveFromQueue();
65 
66  this->UpdateIndex();
67  this->UpdateCacheMap();
68  _t_current += t;
69 }
70 
72 {
73  return new QifOdeSystem(*this);
74 }
75 
77 {
78  MPILib::Index i_th;
79  Number n_bins = this->NumberOfBins();
80  i_th = (_index < 0 ) ? _index + n_bins : _index;
81 
82  MPILib::Probability prob = _buffer_mass[i_th];
83 
84  return prob/(_t_step);
85 }
virtual void Evolve(Time)
evolve interpretation array over time
virtual QifOdeSystem * Clone() const
virtual copying mechanism
unsigned int Number
unsigned int Index
double Time
QifOdeSystem(const SpikingQifNeuralDynamics &)
standard constructor
The objective is find a numerical solution for this equation This requires a numerical representation of the density We will work in the state space of a two dimensional and define a mesh there We first give two examples and then define the general procedure and given in Table for given fixed Delta g see Fig and we will denote coordinates in this dimension by a small letter $v The second dimension can be used to represent parameters as varied as and will represented by $w A strip is constructed by choosing two neighbouring points in state e g and integrating the vector field for a time $T that is assumed to be an integer multiple of a period of time Delta t
Definition: 2D.hpp:101
virtual MPILib::Rate CurrentRate() const
return current firing rate
In this system of ordinary differential equations it is assumed that dynamics is always spiking...
virtual ~QifOdeSystem()
destructor
Base class for all exceptions thrown in GeomLib.
A geometric grid based on Quadratic-Integrate-and Fire (QIF) dynamics.
double Probability
This class models the dynamics of of Quadratic Integrate and Fire (QIF) neurons.
const QifParameter & ParQif() const
MPILib::Number NumberOfBins() const
Number of bins used in the grid representation.
vector< MPILib::Density > _buffer_mass
double Rate