nodekind_bn GetNodeKind_bn ( const node_bn*  node )

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

The value returned will 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.
DISCONNECTED_NODE    The (virtual) parent node of a link which has been disconnected. See example code below.

Version:

In versions 1.09 and earlier, CONSTANT_NODE was called ASSUME_NODE.

See also:

SetNodeKind_bn    Sets it
IsNodeDeterministic_bn    To distinguish between "chance" and "deterministic" nodes
GetNodeType_bn    Indicates whether the node is for a discrete or continuous variable

Example:

The following function is available in NeticaEx.c:
// Returns whether link 'link_index' entering 'node' is disconnected. // bool_ns IsLinkDisconnected (int link_index, const node_bn* node){ const node_bn* parent = NthNode_bn (GetNodeParents_bn (node), link_index); return GetNodeKind_bn (parent) == DISCONNECTED_NODE; }