| NORSYS SOFTWARE © 2012 | NETICA API | C VERSION 5.04

void SetNodeInputName_bn ( | node_bn* node, int input_index, const char* input_name )

Names the link entering node from its input_indexth parent to be input_name.

input_index corresponds to the ordering of the parents obtained by GetNodeParents_bn (with the first parent having input_index = 0). The reason that an index number is passed instead of the actual parent, is because the link may not have a parent node (i.e., it is "disconnected"), or there may be more than 1 link from the same parent to node.

input_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.

To remove the name of a link, pass NULL (not the empty string) for input_name.

input_name must be different from the name of any other links entering node (by case-sensitive comparison, and must be different from the names of any parents of node which are connected to node by an unnamed link.

Input names are used to document what each link means, local to the node, which is especially important if the link is disconnected, or if its parents are continuously being switched. They are also useful as local parameters in equations, instead of using the names of parent nodes, so the equation stays valid even if the parents change.

When links are first created, they are unnamed, and remain so until this function is called, or until they are disconnected from the parent node (in which case they take on the name of the parent). It is possible to name some of the links entering a node, and leave the rest unnamed. All disconnected links are named.

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

Version:

In versions 1.17 and earlier, this function was named SetLinkName_bn.

See also:

GetNodeInputName_bn |  | Retrieves value
GetInputNamed_bn |  | Retrieves the index given the name
GetNodeParents_bn |  | Gets the actual parents of the links (e.g., to find their names or determine their numbering)
SwitchNodeParent_bn |  | Connects the "input" to a parent node