Boost logo

Boost-Commit :

From: ockham_at_[hidden]
Date: 2008-06-16 09:42:54


Author: bernhard.reiter
Date: 2008-06-16 09:42:53 EDT (Mon, 16 Jun 2008)
New Revision: 46423
URL: http://svn.boost.org/trac/boost/changeset/46423

Log:
Minor fixes.
Text files modified:
   sandbox/SOC/2006/tree/trunk/TODO | 5 +++++
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/general.hpp | 5 ++---
   sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp | 1 +
   3 files changed, 8 insertions(+), 3 deletions(-)

Modified: sandbox/SOC/2006/tree/trunk/TODO
==============================================================================
--- sandbox/SOC/2006/tree/trunk/TODO (original)
+++ sandbox/SOC/2006/tree/trunk/TODO 2008-06-16 09:42:53 EDT (Mon, 16 Jun 2008)
@@ -14,6 +14,11 @@
 [section TODO]
 
 General:
+* Is it really a good idea to use InCursor::size_type for size(Cursor)?
+ For a binary_cursor, a boolean size_type would be enough - but
+ not for a subtree algorithm like this one. Maybe we need two different size_types for
+ cursor - a "children" one for iterator compatibility and a "subtree" one for
+ "larger scale".
 * Use the example trees form Knuth as test example data.
 * Write (internal/external?) adaptors for other tree libraries, as Kaspar Peeters' or
   Adobe's.

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/general.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/general.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/cursor/general.hpp 2008-06-16 09:42:53 EDT (Mon, 16 Jun 2008)
@@ -18,6 +18,8 @@
 namespace boost {
 namespace tree {
 
+// These algorithms are actually mostly preorder, as it's most efficient, but I
+// think it doesn't make much sense having in- and postorder versions of them.
 
 // What about the subtree shapes?
 /**
@@ -49,9 +51,6 @@
 }
 
 
-// Is it really a good idea to use InCursor::size_type?
-// For a binary_cursor, a boolean size_type would be enough - but
-// not for a subtree algorithm like this one.
 /**
  * @brief Calculates the number of elements in a subtree.
  * @param c An input cursor.

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp 2008-06-16 09:42:53 EDT (Mon, 16 Jun 2008)
@@ -166,6 +166,7 @@
         // Fill empty tree2 with different data
         create_test_data_tree(tree2);
         validate_test_data_tree(tree2);
+ BOOST_CHECK(tree1 != tree2);
         
         // Swap
         test_swap_binary_trees(tree1, tree2);


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