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

void ReverseLink_bn ( | node_bn* parent, node_bn* child )

Reverses the link from parent to child, so that instead it goes from child to parent.

This is a special function which maintains the joint probability represented by the net, which means any subsequent inference will yield the same results. To do so, Netica may have to add or remove links which go to parent from the parents of child, or which go to child from the parents of parent. If this is not desired then use DeleteLink_bn, followed by an AddLink_bn in the reverse direction. That will change the overall joint probability, and even change the independence information represented by the net.

If links are added, the CPT tables may become very large, possibly resulting in slow behavior or an out-of-memory condition.

If it is not possible to do the reversal, an error will be generated, and the net will not be changed. Reasons it might not be possible include: reversing the link would create a directed cycle, the child or parent node is not a nature node, the link is a time-delay link, the link is disconnected, or the child node has some other disconnected link.

Version:

This function is available in all versions.

See also:

GetNodeParents_bn |  | See what links Netica has added or removed
DeleteLink_bn |  | Followed by AddLink_bn the other way, will result in a reversed link and a net with different independence information
DeleteNodeTables_bn |  | Avoid overly large CPT tables caused by the reversal
AbsorbNodes_bn |  | Removes nodes, also maintaining the overall joint probability
LimitMemoryUsage_ns |  | In case this function is consuming too much memory