MATHVisualSimulator
A BPMN2 simulator for MATH
Public Member Functions | Static Public Member Functions | Properties
Simulator.EmpiricalRandomVariable Class Reference

Inherits Simulator.IRandomVariable.

List of all members.

Public Member Functions

void init (double[] pp)
 Initialize this variable with the given parameters. Intended to be used only by RandomVariableFactory.
 EmpiricalRandomVariable (EmpiricalRandomVariable ev)
bool getTime ()
void setTime (bool tf)
void load (string filename)
void save (string filename, string varName=null)
void fromXml (XmlNode root)
XmlElement toXml (XmlDocument dom, string varName=null)
void setTimeFormatter (ITimeFormatter itf)
ITimeFormatter getTimeFormatter ()
void addDatum (double v)
void merge (EmpiricalRandomVariable ev)
void sort ()
void multiply (double m)
 Modify this variable so as to multiply every draw from this random variable by the argument m.
double next ()
 Draw a random value from this random variable.
double getTotal ()
double getMean ()
 Return the mean of this variable.
double getStddev ()
 Return the standard deviation of this variable. For empirical variables, standard deviation is calculated using the population variance (not a sample variance).
double getPercentile (double percent)
 Provide the value that represents the nth percentile from the data contained in this variable. Most useful for empirical data.
double getMin ()
double getMax ()
string describeVariable (ITimeFormatter itf=null)
 Return a human-readable description of this variable.
string getStringDescription ()
 Return a string representation of this random variable. This description could be fed back into RandomVariableFactory.create() to produce a duplicate of this variable.
LinkedList< double > getHistBins (double w, double off)
LinkedList< double > getHistBins ()
Dictionary< string, int > getHistogram (bool formatAsTime, LinkedList< double > histBins=null)
double[] getValues ()
void subtract (EmpiricalRandomVariable subtrahend_ev)

Static Public Member Functions

static int numberComp (double a, double b)

Properties

string name [get]
 The name of this type of random variable.
string[] parameterNames [get]
 The names of the parameters describing this variable.

Member Function Documentation

string Simulator.EmpiricalRandomVariable.describeVariable ( ITimeFormatter  itf = null)

Return a human-readable description of this variable.

Parameters:
itfIf this parameter is specified, the numbers in the description will be formatted according to the given formatter.
Returns:

Implements Simulator.IRandomVariable.

double Simulator.EmpiricalRandomVariable.getMean ( )

Return the mean of this variable.

Returns:

Implements Simulator.IRandomVariable.

double Simulator.EmpiricalRandomVariable.getPercentile ( double  n)

Provide the value that represents the nth percentile from the data contained in this variable. Most useful for empirical data.

Parameters:
nA number between 0 and 100.
Returns:

Implements Simulator.IRandomVariable.

double Simulator.EmpiricalRandomVariable.getStddev ( )

Return the standard deviation of this variable. For empirical variables, standard deviation is calculated using the population variance (not a sample variance).

Returns:

Implements Simulator.IRandomVariable.

string Simulator.EmpiricalRandomVariable.getStringDescription ( )

Return a string representation of this random variable. This description could be fed back into RandomVariableFactory.create() to produce a duplicate of this variable.

Returns:

Implements Simulator.IRandomVariable.

void Simulator.EmpiricalRandomVariable.init ( double[]  parameters)

Initialize this variable with the given parameters. Intended to be used only by RandomVariableFactory.

Parameters:
parameters

Implements Simulator.IRandomVariable.

void Simulator.EmpiricalRandomVariable.multiply ( double  m)

Modify this variable so as to multiply every draw from this random variable by the argument m.

Parameters:
mThe multiplier

Implements Simulator.IRandomVariable.

double Simulator.EmpiricalRandomVariable.next ( )

Draw a random value from this random variable.

Returns:
A random number

Implements Simulator.IRandomVariable.


Property Documentation

string Simulator.EmpiricalRandomVariable.name [get]

The name of this type of random variable.

Implements Simulator.IRandomVariable.

string [] Simulator.EmpiricalRandomVariable.parameterNames [get]

The names of the parameters describing this variable.

Implements Simulator.IRandomVariable.


The documentation for this class was generated from the following file: