NeuroLab
Noise Class Referenceabstract

A correlated noise source. More...

Inheritance diagram for Noise:

Public Member Functions

virtual void proceedToNextState ()
 Make next value current value.
 
virtual void prepareNextState ()
 Compute next value.
 
virtual NoisesetWeight (double w)
 Set the weight.
 
double getWeight ()
 Get the weight.
 
virtual NoisesetRate (double r)
 Set the rate.
 
double getRate ()
 Get the rate.
 
virtual NoisesetMean (double m)
 Set the mean.
 
double getMean ()
 Get the mean.
 
virtual NoisesetStdDev (double s)
 Set the standard deviation coefficient.
 
double getStdDev ()
 Set the standard deviation coefficient.
 
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 StochasticVariable
 StochasticVariable (class Time *time, const string &name="", const string &type="Stochastic Variable")
 Create.
 
double operator() ()
 Returns the value at the current time step. More...
 
double d ()
 Returns the increment at the current time step. More...
 
- Public Member Functions inherited from StochasticProcess
 StochasticProcess (class Time *time, const string &name="", const string &type="Stochastic")
 Create.
 
virtual ~StochasticProcess ()
 Destroy.
 
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...
 
- 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 Member Functions

 Noise (class NoiseSource *parent, int index, const string &name="", const string &type="Correlated Noise")
 Construct. More...
 
 Noise (const Noise &)
 Construct. More...
 
- Protected Member Functions inherited from Parametric
 Parametric (const string &name, const string &type)
 Create object of type and name.
 
virtual ~Parametric ()
 Destroy object.
 

Friends

class NoiseSource
 

Additional Inherited Members

- Protected Attributes inherited from StochasticProcess
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
 

Detailed Description

A correlated noise source.

This is a noise source made by the NoiseSource class. These noise sources are used as stochastic variables (StochVar) in differential equations (DifferentialEquation). Note that they cannot be set active, as they are driven by the NoiseSource object which made the class. These objects are either of type PoissonNoise, WienerNoise or OUNoise. The difference does only matter for the NoiseSource class, which sets their values accordingly.

Todo:
Finish implementing the noise class.

Constructor & Destructor Documentation

Noise::Noise ( class NoiseSource parent,
int  index,
const string &  name = "",
const string &  type = "Correlated Noise" 
)
protected

Construct.

This constructor is protected, because this class should only be instantiated by calls from the NoiseSource class.

Noise::Noise ( const Noise )
protected

Construct.

This class mustn't be copied.

Member Function Documentation

virtual string Noise::getParameter ( const string &  name) const
virtual

Get parameter.

In a derived class, override this to handle every parameter you implement. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter.

Parameters
namename of parameter

Reimplemented from Parametric.

virtual void Noise::setParameter ( const string &  name,
const string &  value 
)
virtual

Set parameter.

Sets the value of a parameter using strings. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter.

Parameters
namename of parameter
valuevalue of parameter (used with operator<<)

Reimplemented from Parametric.