NORSYS SOFTWARE © 2012 |
NETICA API |
C VERSION 5.04 |

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 WriteNetFindings_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).

If node could already have a finding that you wish to override with this new finding, RetractNodeFindings_bn should be called first, otherwise an "inconsistent findings" error could result.

Version:

This function is available in all versions. In versions previous to 3.00 there was a NeticaEx function called ChangeValue that is now called SetNodeValue.

See also:

EnterFinding_bn | To enter a finding for a discrete or discretized node | |

GetNodeValueEntered_bn | To retrieve the value entered | |

RetractNodeFindings_bn | To clear away the finding entered |

Example:

The following function is available in NeticaEx.c:// This function is useful to enter a new value for node, whether or not it already has one. // void SetNodeValue (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 }