projects
/
SXSI
/
XMLTree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01c3929
)
Documentation step 3: Properly document node numbering functions.
author
Kim Nguyễn
<kn@lri.fr>
Tue, 16 Oct 2012 13:03:47 +0000
(15:03 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Tue, 16 Oct 2012 13:03:47 +0000
(15:03 +0200)
xml-tree.hpp
patch
|
blob
|
history
diff --git
a/xml-tree.hpp
b/xml-tree.hpp
index
8d4af6a
..
aba3160
100644
(file)
--- a/
xml-tree.hpp
+++ b/
xml-tree.hpp
@@
-142,8
+142,23
@@
public:
inline bool is_open(node_t) const;
//Numbering functions
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;
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;
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
uint32_t postorder(node_t) const;
//Tag functions