void SetNodeStateName_bn ( node_bn*  node,   state_bn  state,   const char*  state_name )

Gives the name state_name to that state of node whose index is state.

state must be between 0 and one less than the number that would be returned by GetNodeNumberStates_bn, inclusive.

state_name must be a legal IDname, which means it must have NAME_MAX or fewer characters, all of which are letters, digits or underscores, and it must start with a letter. No two states of a node may have the same name. To avoid these restrictions, you can give the states titles instead; see SetNodeStateTitle_bn.

It is not required that a node's states be named, but if you give names to some of the sates of a node, you should name them all.

It may be more convenient to set the names of all the states at the same time; for that, see SetNodeStateNames_bn.

If you pass NULL (not the empty string) for state_name, it will remove all the state names for node.

Discretized continuous nodes may have their states named, as well as regular discrete nodes.

Netica will make a copy of state_name; it won't modify or free the passed string.

Version:

This function is available in all versions.

See also:

GetNodeStateName_bn  Retrieves values
SetNodeStateNames_bn  Sets names of all states at the same time
SetNodeStateTitle_bn  Doesn't have the restrictions of a name
NewNode_bn  Sets the number of states to start with
GetNodeNumberStates_bn  state must be between 0 and one less than this, inclusive