#DOCUMENTATION
authorClaus Gittinger <cg@exept.de>
Fri, 18 Dec 2015 11:30:56 +0100
changeset 3666 0425141734d6
parent 3665 3e5128566dc2
child 3667 f1a59ae2e064
#DOCUMENTATION class: BinaryTree comment/format in: #documentation
BinaryTree.st
--- a/BinaryTree.st	Fri Dec 04 19:47:55 2015 +0100
+++ b/BinaryTree.st	Fri Dec 18 11:30:56 2015 +0100
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic2' }"
 
+"{ NameSpace: Smalltalk }"
+
 Collection subclass:#BinaryTree
 	instanceVariableNames:'treeRoot sortBlock'
 	classVariableNames:'DefaultSortBlock'
@@ -45,6 +47,14 @@
         The worst case is to add elements in order, reverseOrder or zig-zag order.
         Use instances of my subclasses, which balance the tree if in doubt.
 
+    EXTRA WARNING:
+        the inherited storeString will generate the elements in sorted order,
+        which generates exactly the generated case when read-back.
+        If you use this class and need textual persistency, you should consider rewriting
+        the storeOn: method, to enumerate elements in a binary segmentation fashion.
+        Otherwise, please use one of the balanced trees instead,
+        for example AATree or BTree.
+        
     Changes:
         Changed to be Collection-protocol compatible.
         Slight speedup in insert-code.
@@ -442,11 +452,11 @@
 !BinaryTree class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/BinaryTree.st,v 1.17 2013-06-25 11:23:37 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/BinaryTree.st,v 1.17 2013-06-25 11:23:37 cg Exp $'
+    ^ '$Header$'
 ! !