![]() |
NORSYS SOFTWARE © 2002 | NETICA API | C   VERSION   2.15  |
void EnterNodeValue_bn ( | node_bn* node, double value ) |
Enters a real number finding for node (which is normally a continuous variable node).
If the continuous node has been discretized, then the finding can also be entered as a state using EnterFinding_bn, but if the actual continuous value is known then it is recommended to use that, since it provides more detailed information for functions like WriteCase_bn, and it will automatically be converted to a discrete state when that is needed.
If node is continuous discretized, and value is out of range (less than the low end of the first state, or more than the high end of the last state), then a suitable error will be generated.
If node is discrete (i.e. not continuous), then it must have levels defined, and value must exactly match one of the levels.
If the net has auto-updating (see SetNetAutoUpdate_bn), then a belief updating will be done to reflect the new finding before this function returns (otherwise it will just be done when needed).
Version:
See also:
EnterFinding_bn | To enter a finding for a discrete or discretized node | |
GetNodeValueEntered_bn | To retrieve the value entered |
Example:
// This function is useful to enter a new value for node, whether or not it already has one. // void ChangeValue (node_bn* node, double value){ net_bn* net = GetNodeNet_bn (node); int saved = SetNetAutoUpdate_bn (net, 0); // turning it off can greatly aid efficiency RetractNodeFindings_bn (node); EnterNodeValue_bn (node, value); SetNetAutoUpdate_bn (net, saved); // if changing further findings, defer this step if possible, for efficiency }