double GetNodeFuncReal_bn ( const node_bn*  node,   const state_bn*  parent_states )

This is for deterministic nodes that are continuous or have been given real levels (e.g., by SetNodeLevels_bn). Given a vector of states for the parents of node, this returns the real value of node (which is functionally determined by the parent values) by looking it up in the nodes function table. If the function table between node and its parents has not yet been created, or if it is probabilistic (i.e., a CPT) rather than deterministic, this returns UNDEF_DBL, without generating an error.

If node is discrete, with no real levels defined, an error will be generated (use GetNodeFuncState_bn instead).

The order of the states in parent_states should match the order of the nodes in the list returned by GetNodeParents_bn (this will be the same order that parents were added using AddLink_bn). MapStateList_bn may be useful for that. parent_states can be NULL if node has no parents.

If the node has been given a deterministic equation with SetNodeEquation_bn, you must call EquationToTable_bn before this can be used to retrieve values (if you needed to find values without generating the whole table you would enter findings for the parents, and use CalcNodeValue_bn).

This function ignores any findings entered in the net.

To cycle through all the possibilities of parent_states, see the NeticaEx function NextStates.

Version:

Versions 2.06 and earlier didn't have this function, but had one called GetNodeFuncValue_bn, which worked almost the same, but took both discrete and continuous nodes (i.e., combined this and GetNodeFuncState_bn).

See also:

 SetNodeFuncReal_bn Sets them GetNodeFuncState_bn Same, but returns state integer instead of real value IsNodeDeterministic_bn To check if this function is applicable MapStateList_bn To create the state list passed in