\r
/** IsChild(x,y): returns whether node x is parent of node y. */\r
bool IsChild(treeNode x, treeNode y);\r
+\r
+ /** IsChild(x,y): returns whether node x is the first child of its parent */\r
+ bool IsFirstChild(treeNode x);\r
\r
/** NumChildren(x): number of children of node x. Constant time with the \r
* data structure of Sadakane. */\r
* Very fast in BP. */\r
treeNode FirstChild(treeNode x);\r
\r
+ /** LastChild(x): returns the last child of node x. \r
+ * Implemented by Kim naively. */\r
+ treeNode LastChild(treeNode x);\r
+\r
/** NextSibling(x): returns the next sibling of node x, assuming it \r
* exists. */\r
+\r
treeNode NextSibling(treeNode x);\r
\r
/** PrevSibling(x): returns the previous sibling of node x, assuming it \r