| NORSYS SOFTWARE © 2007 | NETICA API | C VERSION 3.25

nodetype_bn GetNodeType_bn ( | const node_bn* node )

Returns DISCRETE_TYPE if the variable corresponding to node is discrete (digital), and CONTINUOUS_TYPE if it is continuous (analog).

It should be emphasized that the value returned only concerns the underlying physical variable that node represents, not how node acts within the net. For example, continuous variables may be discretized by subdividing them into ranges, and discrete variables may provide real values in continuous settings. See SetNodeLevels_bn for more information.

In order to determine whether a node may act discrete, call GetNodeNumberStates_bn, and if the returned value is greater than 0 then the node can act as a discrete node.

There is no API function to change the type of a node; this can only be set when the node is first created by NewNode_bn. A continuous node may be discretized anytime, by using SetNodeLevels_bn.

WARNING: This function may return other types in the future, so check the return value completely and act appropriately if it has an unexpected value.

Version:

In version 2.07 and later.
Earlier versions had a function called GetNodeDiscrete_bn, which returned TRUE iff a node was discrete.

See also:

GetNodeNumberStates_bn |  | To determine if a node can act discrete
SetNodeLevels_bn |  | To discretize a continuous variable, so it may act discrete
NewNode_bn |  | Originally sets the value that GetNodeType_bn returns
IsNodeDeterministic_bn |  | Return whether a node is deterministically related to its parents
GetNodeKind_bn |  | Whether the node is a nature, decision, utility, constant, etc