vdsNode* vdsFindCommonAncestor (vdsNodeId id1, vdsNodeId id2, int maxdepth, vdsNode *root)

Find the common ancestor of two nodes Given two nodes A and B, returns the ID of the first common ancestor of A & B

Documentation

Find the common ancestor of two nodes Given two nodes A and B, returns the ID of the first common ancestor of A & B. Given the way node IDs are set up (see vds.h), if you pick the node with the bigger ID (say A) and follow its ancestors, the first node you come to with an ID <= the ID of B will be an ancestor of B.
Parameters:
node1 - The ID of the first node.
id2 - The ID of the second node.
maxdepth - If the nodes share a common ancestor with depth greater than maxdepth, the common ancestor with depth=maxdepth is returned.
root - The root of the vertex tree containing nodes.

alphabetic index hierarchy of classes