#include <ModelNeuron/SimLayer.H>
Public Member Functions | |
SimLayer (const SimTime ×tep, const uint width, const uint height, const std::string name="", const std::string units="") | |
constructor | |
virtual | ~SimLayer () |
destructor | |
void | input (const Image< double > &in, const int pos=-1) |
set the input | |
void | inputExc (const Image< double > &in, const int pos=-1) |
set the excitatory input | |
void | inputInh (const Image< double > &in, const int pos=-1) |
set the inhibitory input | |
Image< double > | getOutput (const int pos=-1) const |
get the current output | |
void | evolve (const SimTime &simtime) |
evolve up to specified time | |
virtual void | setModule (const SimUnit &mod)=0 |
set the type of neural simulation module to use | |
virtual void | setModule (const SimUnit &mod, const Location &pos)=0 |
void | initialize () |
void | setTime (const SimTime &time, const bool recurse=true) |
set simulation time step | |
const SimTime | getTime () const |
get current time | |
const SimTime | getTimeStep () const |
get simulation time step | |
virtual SimLayer * | clone () const =0 |
clone the module | |
Protected Member Functions | |
SimLayer (const SimLayer &nlc) | |
SimLayer & | operator= (const SimLayer &nlc) |
Protected Attributes | |
Image< double > | itsOutput |
This partial implementation of SimStructure represents a container for SimUnits (See SimUnit.H) that takes 2D input, gives 2D output, and evolves the internal states of its SimUnits. This class may have sub structures, but this implementation only allows 1 input and output (ie, trying to input or get output to a layer > 0 will fail). See Structure.H for a class which implements sub structures such that they can be input to our output from.
After a call to evolve(time), the modules internal time will be simulated up to 'time' and a call to getOutput() will represent the output of the system at 'time'. The logic is the same as SimUnit (see SimUnit.H). Sub structures are not required to be simulated at the same time step.
Definition at line 59 of file SimLayer.H.
SimLayer::SimLayer | ( | const SimTime & | timestep, | |
const uint | width, | |||
const uint | height, | |||
const std::string | name = "" , |
|||
const std::string | units = "" | |||
) | [inline] |
constructor
Definition at line 179 of file SimLayer.H.
virtual SimLayer::~SimLayer | ( | ) | [inline, virtual] |
destructor
Definition at line 67 of file SimLayer.H.
virtual SimLayer* SimLayer::clone | ( | ) | const [pure virtual] |
clone the module
Implements SimStructure.
Implemented in Layer< T, W >, Layer< LowPassSigmoid, WeightsCS >, Layer< LowPassSigmoid, WeightsDoG >, and Layer< LowPassSigmoid, WeightsBinomial >.
void SimLayer::evolve | ( | const SimTime & | simtime | ) | [inline, virtual] |
evolve up to specified time
Implements SimStructure.
Definition at line 250 of file SimLayer.H.
References Image< T >::clear(), SimTime::NSECS(), and SimTime::nsecs().
Image< double > SimLayer::getOutput | ( | const int | pos = -1 |
) | const [inline, virtual] |
get the current output
Implements SimStructure.
Definition at line 242 of file SimLayer.H.
References ASSERT.
const SimTime SimLayer::getTime | ( | ) | const [inline, virtual] |
const SimTime SimLayer::getTimeStep | ( | ) | const [inline, virtual] |
void SimLayer::input | ( | const Image< double > & | in, | |
const int | pos = -1 | |||
) | [inline, virtual] |
set the input
Implements SimStructure.
Definition at line 218 of file SimLayer.H.
References ASSERT, and Image< T >::getDims().
void SimLayer::inputExc | ( | const Image< double > & | in, | |
const int | pos = -1 | |||
) | [inline, virtual] |
set the excitatory input
Implements SimStructure.
Definition at line 226 of file SimLayer.H.
References ASSERT, and Image< T >::getDims().
void SimLayer::inputInh | ( | const Image< double > & | in, | |
const int | pos = -1 | |||
) | [inline, virtual] |
set the inhibitory input
Implements SimStructure.
Definition at line 234 of file SimLayer.H.
References ASSERT, and Image< T >::getDims().
set the type of neural simulation module to use, at a specific position
Implemented in Layer< T, W >, Layer< LowPassSigmoid, WeightsCS >, Layer< LowPassSigmoid, WeightsDoG >, and Layer< LowPassSigmoid, WeightsBinomial >.
virtual void SimLayer::setModule | ( | const SimUnit & | mod | ) | [pure virtual] |
set the type of neural simulation module to use
Implemented in Layer< T, W >, Layer< LowPassSigmoid, WeightsCS >, Layer< LowPassSigmoid, WeightsDoG >, and Layer< LowPassSigmoid, WeightsBinomial >.
void SimLayer::setTime | ( | const SimTime & | time, | |
const bool | recursive = true | |||
) | [inline, virtual] |
set simulation time step
Implements SimStructure.
Reimplemented in Layer< T, W >, Layer< LowPassSigmoid, WeightsCS >, Layer< LowPassSigmoid, WeightsDoG >, and Layer< LowPassSigmoid, WeightsBinomial >.
Definition at line 313 of file SimLayer.H.
References SimStructure::setTime().