NeuroLab
|
A set of mutually correlated noise sources (Wiener, Poisson and Ornstein-Uhlenbeck processes). More...
Public Member Functions | |
NoiseSource (Time *time, int n) | |
Construct. More... | |
NoiseSource (Time *time, Matrix a) | |
Construct. More... | |
~NoiseSource () | |
Destruct. | |
Noise * | createNoise (int n, const string &t) |
Set/Get a noise object. More... | |
Noise * | operator[] (int n) |
Get a noise object. More... | |
void | setMixingMatrix (Matrix a) |
Set the mixing matrix. More... | |
double | getIndicatorVariance (int n) |
Get variance. | |
double | getCovariationCoeff (int n, int m) |
Get covariation coefficient. More... | |
void | destructionNotify (int n) |
Callback for Noise objects. More... | |
virtual void | prepareNextState () |
Compute next value. More... | |
virtual void | proceedToNextState () |
Set next 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... | |
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 Time * | getTime () 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. | |
Public Member Functions inherited from RandN | |
RandN () | |
Construct. | |
~RandN () | |
Destruct. | |
double | dRandN () |
Retrieve random variable. More... | |
double | dRandE () |
Retrieve random variable. More... | |
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. | |
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 | |
A set of mutually correlated noise sources (Wiener, Poisson and Ornstein-Uhlenbeck processes).
An object of this class creates various noise source which may be correlated. The correlation is achieved by mixing independent noise sources with a mixing matrix (details below).
Construction and usage: The constructor will set up an object with n noise sources. They can be used straight away. The mixing matrix, as well as type and parameters for each process can be set at runtime. Mean, variance and covariation processes can also be obtained at runtime.
Method:
with
NoiseSource::NoiseSource | ( | Time * | time, |
int | n | ||
) |
Construct.
Constructs a NoiseSource object, which produces n noise processes. The default mixing matrix is the identity matrix (Zeros with diagonal Ones). Use setMixingMatrix() to change.
time | Adress of a (central) time object. |
n | Number of processes. |
Construct.
Constructs a NoiseSource object, where the processes are mixed as stated in the given mixing matrix.
time | Adress of a (central) time object. |
a | Mixing matrix. |
Noise* NoiseSource::createNoise | ( | int | n, |
const string & | t | ||
) |
Set/Get a noise object.
This will retrieve the address of a noise object. If the object is not existent, or of a different type as stated by the p, it will be created.
n | The index of the noise. |
t | The type of the noise (can be "Correlated Wiender Process", "Correlated Poisson Process", "Correlated Ornstein-Uhlenbeck Process"). |
void NoiseSource::destructionNotify | ( | int | n | ) |
Callback for Noise objects.
Called by a noise object n, to notify its parent that it has died.
double NoiseSource::getCovariationCoeff | ( | int | n, |
int | m | ||
) |
Get covariation coefficient.
The covariation process (see Covariation) is in many cases just time multiplied by a scalar. The method retrieves this scalar.
n | Index of first noise process. |
m | Index of second noise process. |
Noise* NoiseSource::operator[] | ( | int | n | ) |
Get a noise object.
This returns only existent noise objects.
n | The index of the noise. |
|
virtual |
Compute next value.
This will compute the next value of all indicator variables. The values of the noises are not affected.
Reimplemented from StochasticProcess.
|
virtual |
Set next time step.
This will set all noises to the next time step.
Reimplemented from StochasticProcess.