Modigliani  2.0
A stochastic simulator for axons, neurons, and networks
Public Member Functions | List of all members
modigliani_core::Transition_rate_matrix Class Reference

Holds voltage dependent transition rates for a Markov chain. More...

+ Inheritance diagram for modigliani_core::Transition_rate_matrix:

Public Member Functions

 Transition_rate_matrix (modigliani_base::Size numNewStates, modigliani_base::Real min, modigliani_base::Real max, modigliani_base::Real step)
 Constructor. More...
 
void SetTransitionProbability (modigliani_base::Real voltage, modigliani_base::Size start, modigliani_base::Size stop, modigliani_base::Real probability)
 Sets the transition probability for a given membrane potential. More...
 
void SetTransitionProbability (modigliani_base::Size index, modigliani_base::Size start, modigliani_base::Size stop, modigliani_base::Real probability)
 Sets the transition probability for a given index. More...
 
modigliani_base::Real GetTransitionProbability (modigliani_base::Real voltage, modigliani_base::Size start, modigliani_base::Size stop)
 Returns the transition probability for a given membrane potential. More...
 
modigliani_base::Real GetTransitionProbability (modigliani_base::Size index, modigliani_base::Size start, modigliani_base::Size stop)
 Returns the transition probability for a given index. More...
 
modigliani_base::Size GetIndex (modigliani_base::Real voltage)
 Returns the index for a given membrane potential. More...
 
- Public Member Functions inherited from modigliani_core::Object
modigliani_base::Real timestep () const
 Returns simulation timestep. More...
 
void set_timestep (modigliani_base::Real newTimeStep)
 Sets simulation timestep. More...
 

Detailed Description

Holds voltage dependent transition rates for a Markov chain.

This classes goal is to hold the transition rates for all pairs of states. Transition rates are stored independently for a range of membrane potentials. This range and the precision are specified to the constructor.

The reason we use this class is because Boost's multi array class can be slow, if the data is not accessed properly. See http://stackoverflow.com/questions/446866/boostmulti-array-performance-question.

Here we actually only use a 1 dimensional C-array, but present it as a 3-dim matrix.

Constructor & Destructor Documentation

modigliani_core::Transition_rate_matrix::Transition_rate_matrix ( modigliani_base::Size  numNewStates,
modigliani_base::Real  min,
modigliani_base::Real  max,
modigliani_base::Real  step 
)

Constructor.

Parameters
numNewStatesNumber of new states
minMinimum voltage
maxMaximum voltage
stepVoltage step

Member Function Documentation

modigliani_base::Size modigliani_core::Transition_rate_matrix::GetIndex ( modigliani_base::Real  voltage)

Returns the index for a given membrane potential.

The index is the index in the 1 dimensional array.

Parameters
voltageThe membrane potential
Returns
The index
modigliani_base::Real modigliani_core::Transition_rate_matrix::GetTransitionProbability ( modigliani_base::Real  voltage,
modigliani_base::Size  start,
modigliani_base::Size  stop 
)

Returns the transition probability for a given membrane potential.

Parameters
voltageThe membrane potential
startstarting state
stopdestination state
Returns
The transition probability
modigliani_base::Real modigliani_core::Transition_rate_matrix::GetTransitionProbability ( modigliani_base::Size  index,
modigliani_base::Size  start,
modigliani_base::Size  stop 
)

Returns the transition probability for a given index.

The index is the index in the 1 dimensional array.

Parameters
indexIndex
startstarting state
stopdestination state
Returns
The transition probability
void modigliani_core::Transition_rate_matrix::SetTransitionProbability ( modigliani_base::Real  voltage,
modigliani_base::Size  start,
modigliani_base::Size  stop,
modigliani_base::Real  probability 
)

Sets the transition probability for a given membrane potential.

Parameters
voltagemembrane potential
startstarting state
stopdestination state
probabilityThe transition probability
void modigliani_core::Transition_rate_matrix::SetTransitionProbability ( modigliani_base::Size  index,
modigliani_base::Size  start,
modigliani_base::Size  stop,
modigliani_base::Real  probability 
)

Sets the transition probability for a given index.

The index is the index in the 1 dimensional array.

Parameters
indexIndex
startstarting state
stopdestination state
probabilityThe transition probability

The documentation for this class was generated from the following files: