const char* GetNodeInputName_bn ( const node_bn*  node,   int  input_index )

Returns a string which is the name for input number input_index of node, or the empty string (rather than NULL) if the link does not have a name. Numbering for input_index starts at 0 and proceeds in the same order as parents returned by GetNodeParents_bn.

If the name is present, you can count on it to be a legal IDname, which means that it is NAME_MAX_ns (30) or fewer characters (not including terminating 0).

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 parents' nodes, so the equation stays valid even if the parents change.

If you need the string to persist, make a copy of the string returned, since its contents may become invalid after further calls to Netica API. Do not try to directly modify or free the string returned.

Version:

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

See also:

SetNodeInputName_bn    Sets it
GetNodeParents_bn    Gets the actual parents of the links
GetInputNamed_bn    (inverse function) Returns input index given the name