NeuroLab
StochasticProcess Class Reference

A stochastic variable. More...

Inheritance diagram for StochasticProcess:

Public Member Functions

 StochasticProcess (class Time *time, const string &name="", const string &type="Stochastic")
 Create.
 
virtual ~StochasticProcess ()
 Destroy.
 
virtual void proceedToNextState ()
 Proceed one time step. More...
 
virtual void prepareNextState ()
 Calculate next value (preparing next step). More...
 
bool isNextStatePrepared ()
 Whether.
 
virtual double getIncrement ()
 Returns the increment. More...
 
virtual double getCurrentValue ()
 Returns the value of the process. More...
 
virtual double getNextValue ()
 Returns the next value of the process. More...
 
virtual void setNextValue (double d)
 Set the next value of the process. More...
 
virtual void setCurrentValue (double d)
 Set the current value of the process. More...
 
void setDescription (string s)
 Set stochastic description.
 
virtual void init ()
 Initialise time-dependent values.
 
string getDescription ()
 Get the name. More...
 
- Public Member Functions inherited from Parametric
string getType () const
 Type of object.
 
string getName () const
 Name of object.
 
void setName (const string &name)
 Name of object.
 
string getConfiguration () const
 Returns the configuration of the object. More...
 
string getAllParameters () const
 String with all parameter settings.
 
void addParameter (const string &name)
 Add a parameter. More...
 
void rmParameter (const string &name)
 Remove a parameter. More...
 
virtual void setParameter (const string &name, const string &value)
 Set parameter. More...
 
virtual string getParameter (const string &name) const
 Get parameter. More...
 
- Public Member Functions inherited from TimeDependent
 TimeDependent (class Time *time)
 Construct. More...
 
virtual class TimegetTime () const
 Return pointer to the time object.
 
- Public Member Functions inherited from Physical
 Physical ()
 Construct.
 
 Physical (const Physical &)
 Copy.
 
 Physical (string name)
 Construct.
 
 Physical (string name, string unitPrefix, string unitSymbol)
 Construct.
 
 Physical (string name, Unit unit)
 Construct.
 
virtual string getPhysicalDescription ()
 Returns the physical description. More...
 
virtual string getUnitName ()
 Returns the unit name.
 
virtual string getUnitSymbol ()
 Returns the unit name.
 
virtual void setPhysicalDescription (string name)
 Set the name. Same as setDescription(). More...
 
virtual void setUnit (Unit u)
 Set the unit.
 
virtual void setUnitPrefix (int n)
 Set unit prefix. More...
 
virtual Unit getUnit () const
 Retrieve the unit.
 

Protected Attributes

double stochCurrentValue
 the current value
 
double stochNextValue
 the next value (direct future)
 
bool stochNextStateIsPrepared
 whether prepareNextState() was successful
 
string stochDescription
 the name of the quantity
 

Additional Inherited Members

- Protected Member Functions inherited from Parametric
 Parametric (const string &name, const string &type)
 Create object of type and name.
 
virtual ~Parametric ()
 Destroy object.
 

Detailed Description

A stochastic variable.

This class implements a stochastic process, either has a simple process, or as a function of another variable. All forms of stochastic variables should inherit from this class. Main functionality is implemented in the prepareNextState() function, which should be overriden in deriving classes.

Member Function Documentation

virtual double StochasticProcess::getCurrentValue ( )
inlinevirtual

Returns the value of the process.

This is the current value. The difference to operator()(double) is that it never proceeds the object's time. Implementing this function is compulsary.

string StochasticProcess::getDescription ( )
inlinevirtual

Get the name.

Returns the stochastic name

Reimplemented from Physical.

virtual double StochasticProcess::getIncrement ( )
inlinevirtual

Returns the increment.

This is the difference to the next time step. The difference to operator()() is that it never proceeds the object's time.

virtual double StochasticProcess::getNextValue ( )
inlinevirtual

Returns the next value of the process.

This is the next value. This is the same as getCurrentValue() + getIncrement().

virtual void StochasticProcess::prepareNextState ( )
inlinevirtual

Calculate next value (preparing next step).

This method should be overridden to implement the calculation of the next value, using information wich is available at the current time. The method must set the protected member stochNextStateIsPrepared to true if successful.

Implements TimeDependent.

Reimplemented in NoiseSource, Regular, Poisson, MlNeuron, IfNeuron, SimpleSynapse, DifferentialEquation, ThetaNeuron, Noise, Wiener, EventMultiplexer, and Covariation.

virtual void StochasticProcess::proceedToNextState ( )
inlinevirtual

Proceed one time step.

This method can be overridden to implement the proceeding of one time step. This makes new information available at the current time. (See also proceedToNextState()). The default just writes stochNextValue into stochCurrentValue.

Implements TimeDependent.

Reimplemented in NoiseSource, MlNeuron, IfNeuron, SimpleSynapse, and Noise.

virtual void StochasticProcess::setCurrentValue ( double  d)
inlinevirtual

Set the current value of the process.

Used for reflecting boundaries etc..

Reimplemented in IfNeuron.

virtual void StochasticProcess::setNextValue ( double  d)
inlinevirtual

Set the next value of the process.

Used for reflecting boundaries etc..

Reimplemented in IfNeuron.