Sack Library Documentation
ContentsIndexReferenceHome
sack::containers::BinaryTree Namespace Functions
Functions
 
Name 
Description 
 
 
 
Balances a binary tree. If data is added to a binary list in a linear way (from least to most), the tree can become unbalanced, and all be on the left or right side of data. This routine can analyze branches and perform rotations so that the tree can be discretely rebalanced. 
 
when adding a node if Compare is NULL the default method of a basic unsigned integer compare on the key value is done. if Compare is specified the specified key value of the orginal node (old) and of the new node (new) is added. Result of compare should be ( <0 (lesser)) ( 0 (equal)) ( >0 (greater)) 
 
 
 
Basically this is meant to dump to a log, if the print function is passed as NULL, then the tree's contents are dumped to the log. It dumps a very cryptic log of how all nodes in the tree are arranged. But by allowing the user to provide a method to log his data and key, the logging is more meaningful based on the application. The basic code for managing trees and nodes works.... 
 
Search in a binary tree for the specified key. 
 
While browsing the tree after a find operation move to the next child node, direction 0 is lesser direction !0 is greater.

Binary Trees have a 'current' cursor. These operations may be used to browse the tree. 
 
Returns the node that is set as 'current' in the tree. There is a cursor within the tree that can be used for browsing. 
 
 
 
 
 
 
 
 
 
Returns the total number of nodes in the tree. 
 
 
 
 
 
This sets the current node cursor to the root of the node. 
 
result of fuzzy routine is 0 = match. 100 = inexact match 1 = no match, actual may be larger -1 = no match, actual may be lesser 100 = inexact match- checks nodes near for better match. 
 
 
Removes the currently browsed node from the tree. 
 
During FindInBinaryTree and LocateInBinaryTree, the last found result is stored. This function allows deletion of that node. 
 
returns a shadow of the original. 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.