Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48818 - in sandbox/SOC/2006/tree/trunk: . boost/tree boost/tree/detail/algorithm/cursor libs/tree/doc libs/tree/test
From: ockham_at_[hidden]
Date: 2008-09-17 13:02:14


Author: bernhard.reiter
Date: 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
New Revision: 48818
URL: http://svn.boost.org/trac/boost/changeset/48818

Log:
Some documentation work.
Text files modified:
   sandbox/SOC/2006/tree/trunk/TODO | 8 ++++++--
   sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp | 3 ---
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/postorder.hpp | 2 +-
   sandbox/SOC/2006/tree/trunk/libs/tree/doc/algorithms.qbk | 28 ++++++++++++++++++++++++----
   sandbox/SOC/2006/tree/trunk/libs/tree/doc/tree.qbk | 2 +-
   sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp | 2 --
   6 files changed, 32 insertions(+), 13 deletions(-)

Modified: sandbox/SOC/2006/tree/trunk/TODO
==============================================================================
--- sandbox/SOC/2006/tree/trunk/TODO (original)
+++ sandbox/SOC/2006/tree/trunk/TODO 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -15,6 +15,9 @@
 
 General:
 
+* Think of a couple good examples (draw inspiration eg from Wikipedia: Tree traversal
+ or CRLS) and include them in the docs. Maybe move some files from libs/test to
+ example.
 * Migrate to using Jamfile.v2 from Intrusive.
 * Add performance checks (to a libs/perf/ directory).
 * Look into SOC 2008 projects dsearch (already using concepts from Boost.Tree) and
@@ -22,8 +25,9 @@
 * Can't we really do without inorder_erase()?
 * Remove the word "recursive" from *order subtree algorithms context, as we might
   implement these using iterative versions. Rename *_recursive algorithms to
- *_with_references or so; and use something like #ifdef BOOST_RECURSIVE_ORDER_ALGORITHMS
-* Check if Cursor(balanced_tree_iterator) rellay has no is_root member()!
+ *_with_references or so; and use something like #ifdef BOOST_RECURSIVE_ORDER_ALGORITHMS.
+ Overload then for root_tracking_cursor.
+* Check if Cursor(balanced_tree_iterator) really has no is_root member()!
 * Revisit binary_tree (inorder::)iterator functions
 * Possibly sort out some more concepts, like trees with "downwards" or "upwards" insertion
   (insert()/insert_above()), trees with values only at the leaves (makes sense in combination

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -9,7 +9,6 @@
  * Binary tree implementation
  */
 
-
 #ifndef BOOST_TREE_BINARY_TREE_HPP
 #define BOOST_TREE_BINARY_TREE_HPP
 
@@ -20,8 +19,6 @@
 #include <boost/tree/detail/node/traits.hpp>
 #include <boost/tree/detail/cursor/nary.hpp>
 
-#include <boost/test/minimal.hpp>
-
 #include <memory>
 
 namespace boost {

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/postorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/postorder.hpp 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -179,7 +179,7 @@
  * postorder. @p f must not modify the order of the sequence.
  * If @p f has a return value it is ignored.
  */
-//[postorder_for_each
+//[ postorder_for_each
 template <class Cursor, class Op>
 Op for_each(Cursor s, Op f)
 {

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/doc/algorithms.qbk
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/doc/algorithms.qbk (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/doc/algorithms.qbk 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -11,6 +11,9 @@
  / Algorithms documentation file.
  /]
 
+[import ../../../boost/tree/detail/algorithm/cursor/postorder.hpp]
+[import ../example/for_each.cpp]
+
 [section Algorithms]
 
 While STL algorithms operate on (at least a pair of) iterators, for hierarchic structures
@@ -24,12 +27,29 @@
 There are, conversely, several different methods how to traverse a (sub)tree - one
 has to choose eg whether to "visit" an element before, between or after its descendants.
 
-These three types of traversal are called pre- in- and postorder, and consequently, an
-algorithm can come in each out of these three flavors (and many algorithms will come in
-all three). For clarity, all the algorithms of one such traversal type are bundled in a
-namespace of the corresponding name (ie, `preorder`, `inorder`, and `postorder`).
+These three types of traversal are called /preorder/, /inorder/ and /postorder/, and
+consequently, an algorithm can come in each out of these three flavors
+(and many algorithms will come in all three). For clarity, all the algorithms
+of one such traversal type are bundled in a namespace of the corresponding
+name (ie, `preorder`, `inorder`, and `postorder`).
+
+Algorithms can be used via
+
+[for_each_include_algorithm]
+
+TODO: Include illustration of example data tree.
 
 [section Pre-, In-, and Postorder Algorithms]
+
+[section for_each]
+
+[postorder_for_each]
+
+[section Example]
+[for_each]
+[endsect] [/Example]
+[endsect] [/for_each]
+
 [endsect] [/ Pre-, In-, and Postorder Algorithms]
 
 [endsect] [/ Algorithms]

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/doc/tree.qbk
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/doc/tree.qbk (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/doc/tree.qbk 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -14,7 +14,7 @@
 [library Boost.Tree
     [quickbook 1.4]
     [authors [Reiter, Bernhard]]
- [copyright 2006 Bernhard Reiter]
+ [copyright 2006-2008 Bernhard Reiter]
     [purpose Generic tree framework]
     [license
                     

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp 2008-09-17 13:02:13 EDT (Wed, 17 Sep 2008)
@@ -9,8 +9,6 @@
 
 #include <list>
 
-#include <boost/test/minimal.hpp>
-
 // Test data from http://en.wikipedia.org/wiki/Image:Binary_search_tree.svg
 // (With two additional nodes: 11 inserted left of 13; 12 right of 11)
 // and in combination with http://en.wikipedia.org/wiki/Tree_traversal#Examples


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk