Functions | |
Var * | mdlVar_create (double v) |
The mdlVar_create function allocates and initializes a Var data structure. More... | |
void | mdlVar_use (Var *pThis) |
The mdlVar_use function increments the "use count" for variable this. More... | |
void | mdlVar_destroy (Var *pThis) |
The mdlVar_destroy function decrements the "use count" for variable this and, if the use count becomes zero, frees the variable's storage. More... | |
Var * | mdlVar_setVal (Var *pThis, double v) |
The mdlVar_setVal function sets the current value of Var this to value. More... | |
double | mdlVar_getVal (Var *pThis) |
The mdlVar_getVal function returns the current value of Var this. More... | |
bool | mdlVar_hasNoValue (Var *pThis) |
The mdlVar_hasNoValue function queries if the value of this has not been set yet (or has been set the to special value NA). More... | |
void | mdlVar_saveVal (Var *pThis) |
The mdlVar_saveVal function saves the current value of Var this as its "old" value. More... | |
void | mdlVar_restoreVal (Var *pThis) |
mdlVar_restoreVal sets the current value of this to its old value. More... | |
int | mdlVar_isUnderDetermined (Var *pThis) |
The mdlVar_isUnderDetermined function queries the "under-determined" attribute of Var this. More... | |
void | mdlVar_setUnderDetermined (Var *pThis, int isUnderDetermined) |
The mdlVar_setUnderDetermined function sets the "under-determined" attribute of Var this to the value isUnderDetermined. More... | |
bool | mdlVar_isChanged (Var *pThis, double epsilon) |
The mdlVar_isChanged function tests if the current value of Var this is different from its "old" value by at least tolerance. More... | |
bool | mdlVar_isConstant (Var *pThis) |
The mdlVar_isConstant function queries if the variable is to be treated as a constant. More... | |
void | mdlVar_setConstant (Var *pThis, bool isConstant) |
The mdlVar_setConstant function sets the value or the variable and optionally marks it as a "constant". More... | |
Var* mdlVar_create | ( | double | v | ) |
The mdlVar_create function allocates and initializes a Var
data structure.
[in] | v | specifies the variable's initial value. Passing the constant NA signifies that the variable has no value (yet). |
void mdlVar_destroy | ( | Var * | pThis | ) |
The mdlVar_destroy function decrements the "use count"
for variable this and, if the use count becomes zero, frees the variable's storage.
[in,out] | pThis | use count decremented, freed? |
double mdlVar_getVal | ( | Var * | pThis | ) |
The mdlVar_getVal function returns the current value of
Var this.
If this has no value, then the special value NA is returned.
[in,out] | pThis | variable to query |
bool mdlVar_hasNoValue | ( | Var * | pThis | ) |
The mdlVar_hasNoValue function queries if the value of
this has not been set yet (or has been set the to special value NA).
[in,out] | pThis | variable to query |
bool mdlVar_isChanged | ( | Var * | pThis, |
double | epsilon | ||
) |
The mdlVar_isChanged function tests if the current value
of Var this is different from its "old" value by at least tolerance.
[in] | pThis | variable to query |
[in] | epsilon | threshold |
bool mdlVar_isConstant | ( | Var * | pThis | ) |
The mdlVar_isConstant function queries if the variable is
to be treated as a constant.
[in] | pThis | the variable to query |
int mdlVar_isUnderDetermined | ( | Var * | pThis | ) |
The mdlVar_isUnderDetermined function queries the
"under-determined" attribute of Var this.
[in] | pThis | variable to query |
void mdlVar_restoreVal | ( | Var * | pThis | ) |
mdlVar_restoreVal sets the current value of this to its old value.
[in,out] | pThis | variable to link to |
void mdlVar_saveVal | ( | Var * | pThis | ) |
The mdlVar_saveVal function saves the current value of
Var this as its "old" value.
[in,out] | pThis | variable to update |
void mdlVar_setConstant | ( | Var * | pThis, |
bool | isConstant | ||
) |
The mdlVar_setConstant function sets the value or
the variable and optionally marks it as a "constant".
[in,out] | pThis | variable to modify |
[in] | isConstant | if true, the variable becomes a constant; else the variable is marked as changeable. |
void mdlVar_setUnderDetermined | ( | Var * | pThis, |
int | isUnderDetermined | ||
) |
The mdlVar_setUnderDetermined function sets the
"under-determined" attribute of Var this to the value isUnderDetermined.
[in,out] | pThis | variable to modify |
[in] | isUnderDetermined | value of under-determined attr |
Var* mdlVar_setVal | ( | Var * | pThis, |
double | v | ||
) |
The mdlVar_setVal function sets the current value of
Var this to value.
[in,out] | pThis | variable to update |
[in] | v | new value |
void mdlVar_use | ( | Var * | pThis | ) |
The mdlVar_use function increments the "use count" for variable this.
[in,out] | pThis | use count incremented |