void SetNodeKind_bn ( node_bn*  node,   nodekind_bn  kind )

Sets whether node is a nature, decision, utility or constant node.

kind must be one of:
NATURE_NODE    Bayes nets are composed only of this type (and constant nodes)
This is a "chance" or "deterministic" node of an influence diagram
DECISION_NODE    Indicates a variable that can be controlled
This is a "decision" node of an influence diagram
UTILITY_NODE    A variable to maximize the expected value of
This is a "value" node of an influence diagram
CONSTANT_NODE    A fixed parameter, useful as an equation constant
When its value changes, equations should be reconverted to CPT tables, and maybe the net recompiled
Nodes of one kind can usually be transformed to another at any time, but certain transformations are not allowed. Calling SetNodeKind_bn with a disallowed transformation will result in no changes, and a suitable error report will be generated. An example of a disallowed transformation is a non-deterministic node being transformed into a utility node.

You cannot use SetNodeKind_bn to change a node to kind DISCONNECTED_NODE. Nodes of that kind are created automatically when SwitchNodeParent_bn is called with NULL for the new parent.

Version:

In versions 1.09 and earlier, CONSTANT_NODE was called ASSUME_NODE.

See also:

GetNodeKind_bn    Retrieves value
NewNode_bn    Sets whether node is for a discrete or continuous variable
SwitchNodeParent_bn    To change a node to kind DISCONNECTED_NODE