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. The argument type is a 'state_bn', which is just another name for an 'int', but used to indicate that the int stands for a state index.

state_name must be a legal IDname, which means it must have NAME_MAX_ns (30) 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.

To remove all the state names of a node, you should use SetNodeStateNames_bn (notice the plural), but the same will also be done by a single call to this function if NULL is passed for state_name.

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