JaRMoS  1.1
Java Reduced Model Simulations
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
jarmos.Parameters Class Reference

A class for model parameters. More...

Public Member Functions

 Parameters ()
 Creates a new Parameters object. More...
 
void addParam (String name, double minval, double maxval)
 
double[] getCurrent ()
 Gets the current parameter. More...
 
void setCurrent (double[] newvalues)
 Sets the current parameter to the values passed. More...
 
void setCurrent (int index, double value)
 Sets the value of the current parameter at position index. More...
 
double getMaxValue (int i)
 
double getMinValue (int i)
 
String getLabel (int i)
 Returns the label for the i-th parameter. More...
 
String getName (int i)
 Returns the name for the i-th parameter. More...
 
int getNumParams ()
 
double[] getRandomParam ()
 

Detailed Description

A class for model parameters.

New parameters can be added, parameter ranges queried or random parameters extracted.

Moreover, a current parameter can be set and accessed for convenience.

Author
Daniel Wirtz

Definition at line 17 of file Parameters.java.

Constructor & Destructor Documentation

jarmos.Parameters.Parameters ( )

Creates a new Parameters object.

Definition at line 42 of file Parameters.java.

Member Function Documentation

void jarmos.Parameters.addParam ( String  name,
double  minval,
double  maxval 
)

Definition at line 47 of file Parameters.java.

double [] jarmos.Parameters.getCurrent ( )

Gets the current parameter.

Returns
A double vector

Definition at line 62 of file Parameters.java.

String jarmos.Parameters.getLabel ( int  i)

Returns the label for the i-th parameter.

Parameters
i
Returns

Definition at line 120 of file Parameters.java.

double jarmos.Parameters.getMaxValue ( int  i)
Parameters
i
Returns

Definition at line 101 of file Parameters.java.

double jarmos.Parameters.getMinValue ( int  i)
Parameters
i
Returns

Definition at line 110 of file Parameters.java.

String jarmos.Parameters.getName ( int  i)

Returns the name for the i-th parameter.

Parameters
i
Returns

Definition at line 130 of file Parameters.java.

int jarmos.Parameters.getNumParams ( )

Definition at line 138 of file Parameters.java.

double [] jarmos.Parameters.getRandomParam ( )

Definition at line 142 of file Parameters.java.

void jarmos.Parameters.setCurrent ( double[]  newvalues)

Sets the current parameter to the values passed.

If the vector size does not match the current parameter number, an IllegalArgumentException is thrown.

Parameters
newvalues

Definition at line 72 of file Parameters.java.

void jarmos.Parameters.setCurrent ( int  index,
double  value 
)

Sets the value of the current parameter at position index.

Parameters
indexThe parameter index
valueThe new value

Definition at line 89 of file Parameters.java.


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