- node_t select_child(node_t, std::unordered_set<tag_t>*) const;
- node_t select_descendant(node_t, std::unordered_set<tag_t>*) const;
- node_t select_sibling(node_t, std::unordered_set<tag_t>*) const;
- node_t select_following_before (node_t,
- std::unordered_set<tag_t>*, node_t) const;
+
+ /**
+ * [select_child(n, tags)] returns the first child of [n] in
+ * pre-order which has a tag in [tags]. [tags] is a xml_tree::NIL_TAG_ID
+ * terminated array of xml_tree::tag_t. Returns xml_tree::NIL if no such
+ * node exists.
+ * Runs in O(sizeof(tags))
+ */
+ node_t select_child(node_t, tag_t*) const;
+
+ /**
+ * [select_descendant(n, tags)] returns the first descendant of [n] in
+ * pre-order which has a tag in [tags]. [tags] is a xml_tree::NIL_TAG_ID
+ * terminated array of xml_tree::tag_t. Returns xml_tree::NIL if no such
+ * node exists.
+ * Runs in O(sizeof(tags))
+ */
+ inline node_t select_descendant(node_t, tag_t*) const;
+
+ /**
+ * [select_sibling(n, tags)] returns the first following sibling of
+ * of [n] in pre-order which has a tag in [tags].
+ * [tags] is a xml_tree::NIL_TAG_ID terminated array of xml_tree::tag_t.
+ * Returns xml_tree::NIL if no such node exists.
+ * Runs in O(sizeof(tags))
+ */
+ node_t select_sibling(node_t, tag_t*) const;
+
+ /**
+ * [select_sibling(n, tags, m)] returns the first following node
+ * of [n] in pre-order which has a tag in [tags] and which occurs before
+ * node [m]. [tags] is a xml_tree::NIL_TAG_ID terminated array of
+ * xml_tree::tag_t. Returns xml_tree::NIL if no such node exists.
+ * Runs in O(sizeof(tags))
+ */
+ inline node_t select_following_before (node_t, tag_t*, node_t) const;
+
+ /**
+ * [closing(n)] returns the node identifier corresponding to the closing
+ * parenthesis associated with [n] in the underlying BP representation.
+ * The result is undefined if [n] does not point to an opening parenthesis.
+ * Runs in O(1).
+ */