SimUnit Class Reference

Inheritance diagram for SimUnit:
Inheritance graph
[legend]
Collaboration diagram for SimUnit:
Collaboration graph
[legend]

List of all members.

Public Types

enum  RateType { NORMAL, STRICT, OPTIM }
typedef CreateFunctor< SimUnit,
ParamList< SimTime > > 
Creator
typedef GenericFactory
< SimUnit, std::string,
Creator > 
Factory

Public Member Functions

 SimUnit (const SimTime &timestep=SimTime::MSECS(1.0), const RateType ratetype=NORMAL, const std::string &name="", const std::string &units="")
 implementation of inlined SimUnit functions
virtual ~SimUnit ()
 virtual destructor for propper inheritance
void input (const double &in)
 input to the computation unit
void inputExc (const double &in)
 input excitation to the computation unit
void inputInh (const double &in)
 input inhibition to the computation unit
virtual void setV (const double &in)
 set the voltage (or other state value)
const double getOutput () const
 get the output since the last call to evolve
virtual const double getDisplayOutput () const
 get an output for display
void evolve (const SimTime &t)
 integrate to time t, updating any decoders and internal variables
virtual const uint numSubs () const
 get the number of sub units (default implementation returns 0)
virtual const SimUnitgetSub (const uint i) const
void initialize ()
void setDecoderPre (const NeuralDecoder &nd)
 hook up a decoder of desired
void setDecoderPost (const NeuralDecoder &nd)
 hook up a decoder of desired
void setName (const std::string &name)
 set the modules name
void setUnits (const std::string &units)
 set the output units in SI
void setOutput (const double &val, const bool recursive=true)
 set the initial output
void setTime (const SimTime &time, const bool recursive=true)
 set the current time
const SimTime getTime () const
 return our internal time
const SimTime getTimeStep () const
 return our internal time step
const std::string getName () const
 return the name of this module
const std::string getUnits () const
 return the units of this modules output
const RateType getRateType () const
 return this modules rate type
SimUnitclone () const
virtual SimUniteditSub (const uint i)

Protected Member Functions

 SimUnit (const SimUnit &rhs)
SimUnitoperator= (const SimUnit &rhs)

Detailed Description

Definition at line 79 of file SimUnit.H.


Constructor & Destructor Documentation

SimUnit::SimUnit ( const SimTime timestep = SimTime::MSECS(1.0),
const RateType  ratetype = NORMAL,
const std::string name = "",
const std::string units = "" 
) [inline]

implementation of inlined SimUnit functions

Constructor with default params

Parameters:
timeStep is the integration time step, in milliseconds
name is the name of the module
units are the units in SI

Definition at line 280 of file SimUnit.H.

SimUnit::~SimUnit (  )  [inline, virtual]

virtual destructor for propper inheritance

Definition at line 293 of file SimUnit.H.

SimUnit::SimUnit ( const SimUnit rhs  )  [inline, protected]

restrict copy constructor and assignment, use clone instead so derived classes create the correct objects and we avoid slicing

Definition at line 548 of file SimUnit.H.

References NeuralDecoder::clone().


Member Function Documentation

SimUnit * SimUnit::clone (  )  const [inline]

clone the object, like a virtual copy constructor. This function implemented in NeurSimModuleDerived, which other objects should derive from.

Definition at line 603 of file SimUnit.H.

SimUnit & SimUnit::editSub ( const uint  i  )  [inline, virtual]

Returns a reference to the subcomponent. You should check with numSubs before calling (default implementation produces LFATAL) and should use very carefully to ensure the object will not be destroyed by the owner while in use!

Reimplemented in IZNeuron, NeuralColumn< T >, NeuralColumn< SimUnit * >, and NeuralColumn< IZNeuron >.

Definition at line 437 of file SimUnit.H.

Referenced by setOutput(), and setTime().

void SimUnit::evolve ( const SimTime t  )  [inline]

integrate to time t, updating any decoders and internal variables

Definition at line 345 of file SimUnit.H.

References NeuralDecoder::getOutput(), SimTime::NSECS(), SimTime::nsecs(), and NeuralDecoder::push().

const double SimUnit::getDisplayOutput (  )  const [inline, virtual]
const std::string SimUnit::getName ( void   )  const [inline]

return the name of this module

Definition at line 527 of file SimUnit.H.

Referenced by IZNeuron::setup().

const double SimUnit::getOutput (  )  const [inline]

get the output since the last call to evolve

Definition at line 331 of file SimUnit.H.

const SimUnit::RateType SimUnit::getRateType (  )  const [inline]

return this modules rate type

Definition at line 541 of file SimUnit.H.

const SimUnit & SimUnit::getSub ( const uint  i  )  const [inline, virtual]

Returns a reference to the subcomponent. You should check with numSubs before calling (default implementation produces LFATAL) and should use very carefully to ensure the object will not be destroyed by the owner while in use!

Reimplemented in IZNeuron, NeuralColumn< T >, NeuralColumn< SimUnit * >, and NeuralColumn< IZNeuron >.

Definition at line 428 of file SimUnit.H.

const SimTime SimUnit::getTime (  )  const [inline]

return our internal time

Definition at line 513 of file SimUnit.H.

const SimTime SimUnit::getTimeStep (  )  const [inline]

return our internal time step

Definition at line 520 of file SimUnit.H.

const std::string SimUnit::getUnits (  )  const [inline]

return the units of this modules output

Definition at line 534 of file SimUnit.H.

void SimUnit::initialize (  )  [inline]

reset the object to post construction then call doInit() to perform any subclass specific initialization.

Definition at line 446 of file SimUnit.H.

References NeuralDecoder::reset(), and SimTime::ZERO().

void SimUnit::input ( const double &  in  )  [inline]

input to the computation unit

Definition at line 302 of file SimUnit.H.

void SimUnit::inputExc ( const double &  in  )  [inline]

input excitation to the computation unit

Definition at line 312 of file SimUnit.H.

void SimUnit::inputInh ( const double &  in  )  [inline]

input inhibition to the computation unit

Definition at line 319 of file SimUnit.H.

const uint SimUnit::numSubs (  )  const [inline, virtual]

get the number of sub units (default implementation returns 0)

Reimplemented in IZNeuron, NeuralColumn< T >, NeuralColumn< SimUnit * >, and NeuralColumn< IZNeuron >.

Definition at line 421 of file SimUnit.H.

Referenced by setOutput(), and setTime().

void SimUnit::setDecoderPost ( const NeuralDecoder nd  )  [inline]

hook up a decoder of desired

Definition at line 471 of file SimUnit.H.

References NeuralDecoder::clone().

void SimUnit::setDecoderPre ( const NeuralDecoder nd  )  [inline]

hook up a decoder of desired

Definition at line 461 of file SimUnit.H.

References NeuralDecoder::clone().

void SimUnit::setName ( const std::string name  )  [inline]

set the modules name

Definition at line 479 of file SimUnit.H.

Referenced by IZNeuron::setup().

void SimUnit::setOutput ( const double &  val,
const bool  recursive = true 
) [inline]

set the initial output

Definition at line 493 of file SimUnit.H.

References editSub(), numSubs(), and setOutput().

Referenced by setOutput().

void SimUnit::setTime ( const SimTime time,
const bool  recursive = true 
) [inline]

set the current time

Definition at line 503 of file SimUnit.H.

References editSub(), numSubs(), and setTime().

Referenced by setTime().

void SimUnit::setUnits ( const std::string units  )  [inline]

set the output units in SI

Definition at line 486 of file SimUnit.H.

void SimUnit::setV ( const double &  in  )  [inline, virtual]

The documentation for this class was generated from the following file:
Generated on Sun May 8 08:43:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3