void EnterIntervalFinding_bn ( node_bn*  node,   double  low,   double  high )

Enters a likelihood finding for node equivalent to an interval extending from low to high: [low, high].

The likelihood outside the interval is zero, while inside the interval it is uniform (i.e., a "rectangular distribution").

This will not remove any findings already entered for node (it will accumulate), so you may want to call RetractNodeFindings_bn first.

If node is a continuous node (but discretized, see NewNode_bn), then low and high refer to continuous values the node can take. Then high must be greater than low.

If it is a discrete node, then low and high are state numbers, and so must be integers. In that case, the interval includes both end states (so it is okay if low = high).

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


Versions 3.15 and later have this function.

See also:

EnterNodeValue_bn    Enter a point value for a continuous node
EnterFinding_bn    Enter discrete finding
RetractNodeFindings_bn    To remove the finding entered
EnterGaussianFinding_bn    Enter a Gaussian distribution finding


// This function will clear previously entered finding information
// before entering new interval information.
void SetIntervalFinding (node_bn* node, double lo, double hi){
    net_bn* net = GetNodeNet_bn (node);
    int saved = SetNetAutoUpdate_bn (net, 0);    // turning it off can greatly aid efficiency
    RetractNodeFindings_bn (node);
    EnterIntervalFinding_bn (node, lo, hi);  
    SetNetAutoUpdate_bn (net, saved);