#include <OSOption.h>
Collaboration diagram for InitVariableValues:
Public Member Functions | |
InitVariableValues () | |
Default constructor. | |
~InitVariableValues () | |
Class destructor. | |
bool | IsEqual (InitVariableValues *that) |
A function to check for the equality of two objects. | |
bool | setRandom (double density, bool conformant) |
A function to make a random instance of this class. | |
bool | setVar (int numberOfVar, InitVarValue **var) |
A function to set an array of elements. | |
bool | setVar (int numberOfVar, int *idx, double *value) |
Alternative signature for this function. | |
bool | addVar (int idx, double value) |
A function to add a element. | |
Public Attributes | |
int | numberOfVar |
number of children | |
InitVarValue ** | var |
initial value for each variable |
Definition at line 1097 of file OSOption.h.
InitVariableValues::InitVariableValues | ( | ) |
InitVariableValues::~InitVariableValues | ( | ) |
bool InitVariableValues::IsEqual | ( | InitVariableValues * | that | ) |
A function to check for the equality of two objects.
Definition at line 8961 of file OSOption.cpp.
References numberOfVar, and var.
bool InitVariableValues::setRandom | ( | double | density, | |
bool | conformant | |||
) |
A function to make a random instance of this class.
density,: | corresponds to the probability that a particular child element is created | |
conformant,: | if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" atrbutes and <XXX> children) |
Definition at line 10671 of file OSOption.cpp.
References numberOfVar, OSRand(), InitVarValue::setRandom(), and var.
Referenced by VariableOption::setRandom().
bool InitVariableValues::setVar | ( | int | numberOfVar, | |
InitVarValue ** | var | |||
) |
A function to set an array of elements.
numberOfVar,: | number of elements to be set | |
var,: | the array of elements that are to be set |
Definition at line 4482 of file OSOption.cpp.
References ErrorClass::errormsg, and var.
Referenced by OSOption::setInitVarValues(), and OSOption::setInitVarValuesSparse().
bool InitVariableValues::setVar | ( | int | numberOfVar, | |
int * | idx, | |||
double * | value | |||
) |
Alternative signature for this function.
numberOfVar,: | number of elements to be set | |
idx,: | the array of indices | |
value,: | the array of corresponding values |
Definition at line 4516 of file OSOption.cpp.
References InitVarValue::idx, InitVarValue::value, and var.
bool InitVariableValues::addVar | ( | int | idx, | |
double | value | |||
) |
A function to add a element.
idx,: | the index of the variable to be given an initial value | |
value,: | the initial variable value to be added |
Definition at line 4547 of file OSOption.cpp.
References ErrorClass::errormsg, InitVarValue::idx, numberOfVar, InitVarValue::value, and var.
Referenced by OSOption::setAnotherInitVarValue().
number of children
Definition at line 1101 of file OSOption.h.
Referenced by addVar(), OSOption::getNumberOfInitVarValues(), IsEqual(), OSOption::setInitVarValuesSparse(), setRandom(), and ~InitVariableValues().
initial value for each variable
Definition at line 1104 of file OSOption.h.
Referenced by addVar(), OSOption::getInitVarValuesSparse(), InitVariableValues(), IsEqual(), OSOption::setInitVarValuesDense(), setRandom(), setVar(), and ~InitVariableValues().