From a48601dcbcddb424105024b41d85f724021ea787 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Tue, 16 Oct 2012 15:03:47 +0200 Subject: [PATCH] Documentation step 3: Properly document node numbering functions. --- xml-tree.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xml-tree.hpp b/xml-tree.hpp index 8d4af6a..aba3160 100644 --- a/xml-tree.hpp +++ b/xml-tree.hpp @@ -142,8 +142,23 @@ public: inline bool is_open(node_t) const; //Numbering functions + /** + * [depth(n)] returns the depths of node [n]. The root has depth 1. + * Runs in O(1) + */ uint32_t depth(node_t) const; + + /** + * [preorder(n)] returns the preorder of node [n]. Equivalent to calling + * rank on the underlying BP representation. + * Runs in O(1) + */ uint32_t preorder(node_t) const; + + /** + * [preorder(n)] returns the postorder of node [n]. + * Runs in O(1) + */ uint32_t postorder(node_t) const; //Tag functions -- 2.17.1