void RemoveNodeState_bn ( node_bn*  node,   state_bn  state )

Removes state from the states of node, so that node has one fewer state.

This function is for discrete nodes only. It is not for continuous nodes, even if they have been discretized (use SetNodeLevels_bn instead).

The CPTable will be renormalized to account for the missing state. If the probability for the missing state was 1.0 anywhere in the table, an error will be generated.

WARNING: You may want to remove any finding for node before calling this function, since if node has a finding, and it is for the state being removed, an error will be generated. If it is for another state, then that state's index will be properly modified so that after the removal operation it will correspond to the same state as it did before.

Version:

Since version 3.

See also:

AddNodeStates_bn    Add one or more states instead
ReorderNodeStates_bn    Assign a new order to the states
GetStateNamed_bn    Retrieve the new indexes of the states
GetNodeNumberStates_bn    state must be between 0 and one less than this, inclusive
SetNodeLevels_bn    For continuous nodes
RetractNodeFindings_bn    May want to call this first