NORSYS SOFTWARE © 2012 | NETICA API | C   VERSION   5.04  |
bool_ns IsNodeRelated_bn ( | const node_bn* node1, const char* relation, const node_bn* node2 ) |
Tests whether node1 is in the relationship relation with node2.
Returns TRUE if-and-only-if the expression "node1 is/is-a/is-in-the relation of/to/with node2" is true.
relation should be one of "parent", "child", "ancestor", "descendent", "connected", "markov_blanket", "d_connected".
Version:
See also:
GetRelatedNodes_bn | Finds all nodes bearing relationship | |
GetRelatedNodesMult_bn | Same, but for all members in a nodelist | |
GetNodeParents_bn | Finds all parents of a node | |
GetNodeChildren_bn | Finds all children of a node | |
GetNetNodes_bn | Get all nodes in the net |
Example:
//Test if node1 is a parent of node2 if (IsNodeRelated_bn (node1, "parent", node2)) ...Example 2:
//Test if node1 is in the markov blanket of node2 if (IsNodeRelated_bn (node1, "markov_blanket", node2)) ...