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

const nodelist_bn* GetNodeChildren_bn ( | const node_bn* node )

Returns a list of the children of node. Those are the nodes that have a link going to them from node. If it has no children then the empty list (rather than NULL) will be returned.

If there are several links from node to the same child, then that child will appear only once in the list returned, so the length of the returned list may be used to provide the number of unique children of node.

If you need the list to persist, make a copy of the list returned (with DupNodeList_bn), since its contents may become invalid after further calls to Netica API (e.g., one that changes the links of a net, such as AddLink_bn). This is a list managed by Netica (declared const), so do not call any function to modify or free it (e.g., DeleteNodeList_bn).

Consecutive calls to this function may yield lists in different orders, so if you are depending on a consistent ordering (for example, by using integers to index the nodes), construct a fixed list by calling DupNodeList_bn on the list returned.

Version:

This function is available in all versions.

See also:

GetNodeParents_bn |  | Get a list of the parents
AddLink_bn |  | Create a new child
DeleteLink_bn |  | Remove a child