Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::containers::BinaryTree Namespace
Name 
Description 
The following table lists functions in this documentation. 
The following table lists types in this documentation. 
The following table lists macros in this documentation. 
 
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. 
Name 
Description 
Adds a user pointer identified by key to a binary list
This option may be passed to extended CreateBinaryTree methods to disallow adding of duplicates. Otherwise duplicates will be added; they will be added to the side of the node with the same value that has less children. Trees are created by default without this option, allowing the addition of duplicates. 
This is the simplest way to create a binary tree.
The default compare routine treats 'key' as an integer value that is compared against other for lesser/greater condition.
This tree also allows duplicates to be added. 
Creates a binary tree, allowing specification of comparison and destruction routines. 
This is the simpler case of CreateBinaryTreeExtended, which does not make you pass DBG_SRC.
 
Name 
Description 
Generic Compare is the type declaration for the callback routine for user custom comparisons. This routine should return -1 if new is less than old, it should return 1 if new is more than old, and it should return 0 if new and old are the same key. 
Signature for the user callback passed to CreateBinaryTreeEx that will be called for each node removed from the binary list
This type defines a specific node in the tree. It is entirely private, and is a useless definition. 
Defines a Binary Tree. 
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.
What do you think about this topic? Send feedback!