Miind
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MPILib::algorithm::PersistantAlgorithm Class Reference

#include <libs/MPILib/include/PersistantAlgorithm.hpp>

Inheritance diagram for MPILib::algorithm::PersistantAlgorithm:
Inheritance graph
Collaboration diagram for MPILib::algorithm::PersistantAlgorithm:
Collaboration graph

Public Types

typedef double WeightType
 

Public Member Functions

 PersistantAlgorithm ()
 
 PersistantAlgorithm (const PersistantAlgorithm &)
 
 ~PersistantAlgorithm ()
 
virtual PersistantAlgorithmclone () const
 
virtual void configure (const SimulationRunParameter &simParam)
 
virtual void evolveNodeState (const std::vector< Rate > &nodeVector, const std::vector< double > &weightVector, Time time)
 
virtual void evolveNodeState (const std::vector< Rate > &nodeVector, const std::vector< double > &weightVector, Time time, const std::vector< NodeType > &typeVector)
 
std::valarray< double > & getArrayInterpretation (AlgorithmGrid &grid) const
 
std::valarray< double > & getArrayState (AlgorithmGrid &grid) const
 
virtual Rate getCurrentRate () const
 
virtual Time getCurrentTime () const
 
virtual AlgorithmGrid getGrid (NodeId, bool) const
 
NumbergetStateSize (AlgorithmGrid &grid) const
 
Number getStateSize (const AlgorithmGrid &grid) const
 
virtual void prepareEvolve (const std::vector< Rate > &nodeVector, const std::vector< double > &weightVector, const std::vector< NodeType > &typeVector)
 

Private Member Functions

std::vector< double > getInitialState () const
 
double innerProduct (const std::vector< Rate > &nodeVector, const std::vector< double > &weightVector)
 

Private Attributes

MPILib::Rate _rate
 
MPILib::Time _time
 

Detailed Description

Definition at line 29 of file PersistantAlgorithm.hpp.

Member Typedef Documentation

typedef double MPILib::AlgorithmInterface< double >::WeightType
inherited

Definition at line 41 of file AlgorithmInterface.hpp.

Constructor & Destructor Documentation

MPILib::algorithm::PersistantAlgorithm::PersistantAlgorithm ( )

Definition at line 36 of file PersistantAlgorithm.cpp.

Referenced by clone().

MPILib::algorithm::PersistantAlgorithm::PersistantAlgorithm ( const PersistantAlgorithm rhs)

Cloning operation, to provide each DynamicNode with its own Algorithm instance. Clients use the naked pointer at their own risk.

Definition at line 42 of file PersistantAlgorithm.cpp.

MPILib::algorithm::PersistantAlgorithm::~PersistantAlgorithm ( )

Definition at line 48 of file PersistantAlgorithm.cpp.

Member Function Documentation

PersistantAlgorithm * MPILib::algorithm::PersistantAlgorithm::clone ( ) const
virtual

Cloning operation, to provide each DynamicNode with its own Algorithm instance. Clients use the naked pointer at their own risk.

Implements MPILib::AlgorithmInterface< double >.

Definition at line 51 of file PersistantAlgorithm.cpp.

References PersistantAlgorithm().

void MPILib::algorithm::PersistantAlgorithm::configure ( const SimulationRunParameter simParam)
virtual

Configure the Algorithm

Parameters
simParam

Implements MPILib::AlgorithmInterface< double >.

Definition at line 55 of file PersistantAlgorithm.cpp.

References _time, and MPILib::SimulationRunParameter::getTBegin().

void MPILib::algorithm::PersistantAlgorithm::evolveNodeState ( const std::vector< Rate > &  nodeVector,
const std::vector< double > &  weightVector,
Time  time 
)
virtual

Evolve the node state

Parameters
nodeVectorVector of the node States
weightVectorVector of the weights of the nodes
timeTime point of the algorithm

Reimplemented from MPILib::AlgorithmInterface< double >.

Definition at line 60 of file PersistantAlgorithm.cpp.

References _rate, _time, and innerProduct().

virtual void MPILib::AlgorithmInterface< double >::evolveNodeState ( const std::vector< Rate > &  nodeVector,
const std::vector< double > &  weightVector,
Time  time,
const std::vector< NodeType > &  typeVector 
)
inlinevirtualinherited

Evolve the node state. In the default case it simply calls envolveNodeState without the NodeTypes. However if an algorithm needs the nodeTypes of the precursors overwrite this function.

Parameters
nodeVectorVector of the node States
weightVectorVector of the weights of the nodes
timeTime point of the algorithm
typeVectorVector of the NodeTypes of the precursors

Definition at line 83 of file AlgorithmInterface.hpp.

std::valarray<double>& MPILib::AlgorithmInterface< double >::getArrayInterpretation ( AlgorithmGrid grid) const
inlineinherited

Definition at line 125 of file AlgorithmInterface.hpp.

std::valarray<double>& MPILib::AlgorithmInterface< double >::getArrayState ( AlgorithmGrid grid) const
inlineinherited

Definition at line 120 of file AlgorithmInterface.hpp.

Rate MPILib::algorithm::PersistantAlgorithm::getCurrentRate ( ) const
virtual

The calculated rate of the node

Returns
The rate of the node

Implements MPILib::AlgorithmInterface< double >.

Definition at line 79 of file PersistantAlgorithm.cpp.

References _rate.

Time MPILib::algorithm::PersistantAlgorithm::getCurrentTime ( ) const
virtual

The current timepoint

Returns
The current time point

Implements MPILib::AlgorithmInterface< double >.

Definition at line 75 of file PersistantAlgorithm.cpp.

References _time.

AlgorithmGrid MPILib::algorithm::PersistantAlgorithm::getGrid ( NodeId  ,
bool  b_state 
) const
virtual

Stores the algorithm state in a Algorithm Grid

Parameters
NodeId,idof the node that needs to return the grid
b_state,returnthe entire state if true, a reduced grid with just the firing rate info if false
Returns
The state of the algorithm. The Grid must at least contain one element; an empty grid will cause a crash.

Implements MPILib::AlgorithmInterface< double >.

Definition at line 102 of file PersistantAlgorithm.cpp.

References MPILib::WILSON_COWAN_STATE_DIMENSION.

std::vector< double > MPILib::algorithm::PersistantAlgorithm::getInitialState ( ) const
private

Definition at line 96 of file PersistantAlgorithm.cpp.

References MPILib::WILSON_COWAN_STATE_DIMENSION.

Number& MPILib::AlgorithmInterface< double >::getStateSize ( AlgorithmGrid grid) const
inlineinherited

Definition at line 130 of file AlgorithmInterface.hpp.

Number MPILib::AlgorithmInterface< double >::getStateSize ( const AlgorithmGrid grid) const
inlineinherited

Definition at line 135 of file AlgorithmInterface.hpp.

double MPILib::algorithm::PersistantAlgorithm::innerProduct ( const std::vector< Rate > &  nodeVector,
const std::vector< double > &  weightVector 
)
private

Definition at line 83 of file PersistantAlgorithm.cpp.

Referenced by evolveNodeState().

virtual void MPILib::AlgorithmInterface< double >::prepareEvolve ( const std::vector< Rate > &  nodeVector,
const std::vector< double > &  weightVector,
const std::vector< NodeType > &  typeVector 
)
inlinevirtualinherited

prepare the Evolve method

Parameters
nodeVectorVector of the node States
weightVectorVector of the weights of the nodes
typeVectorVector of the NodeTypes of the precursors

Definition at line 95 of file AlgorithmInterface.hpp.

Member Data Documentation

MPILib::Rate MPILib::algorithm::PersistantAlgorithm::_rate
private

Definition at line 81 of file PersistantAlgorithm.hpp.

Referenced by evolveNodeState(), and getCurrentRate().

MPILib::Time MPILib::algorithm::PersistantAlgorithm::_time
private

Definition at line 82 of file PersistantAlgorithm.hpp.

Referenced by configure(), evolveNodeState(), and getCurrentTime().


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