![]() |
![]() |
![]() |
|
[
About the Wizard's Toolkit ] [ Command-line Tools ] [ Application Program Interface ] [ Install from Source Unix Windows Binary Releases Unix Windows ] [ Download ] [ Search ] [ Sponsors: ] |
AddValueToSplayTree() adds a value to the splay-tree. The format of the AddValueToSplayTree method is:
WizardBooleanType AddValueToSplayTree(SplayTreeInfo *splay_tree,
const void *key,const void *value)
A description of each parameter follows: splay_treeThe splay-tree info. keyThe key. valueThe value. BalanceSplayTree() balances the splay-tree. The format of the BalanceSplayTree method is: void *BalanceSplayTree(SplayTreeInfo *splay_tree,const void *key) A description of each parameter follows: splay_treeThe splay-tree info. keyThe key. CloneSplayTree() clones the splay tree. The format of the CloneSplayTree method is:
SplayTreeInfo *CloneSplayTree(SplayTreeInfo *splay_tree,
void *(*clone_key)(void *),void *(*cline_value)(void *))
A description of each parameter follows: splay_treeThe splay tree. clone_keyThe key clone method, typically ConstantString(), called whenever a key is added to the splay-tree. clone_valueThe value clone method; typically ConstantString(), called whenever a value object is added to the splay-tree. CompareSplayTreeString() method finds a node in a splay-tree based on the contents of a string. The format of the CompareSplayTreeString method is: int CompareSplayTreeString(const void *target,const void *source) A description of each parameter follows: targetThe target string. sourceThe source string. CompareSplayTreeStringInfo() finds a node in a splay-tree based on the contents of a string. The format of the CompareSplayTreeStringInfo method is: int CompareSplayTreeStringInfo(const void *target,const void *source) A description of each parameter follows: targetThe target string. sourceThe source string. DeleteNodeByValueFromSplayTree() deletes a node by value from the splay-tree. The format of the DeleteNodeByValueFromSplayTree method is:
WizardBooleanType DeleteNodeByValueFromSplayTree(
SplayTreeInfo *splay_tree,const void *value)
A description of each parameter follows: splay_treeThe splay-tree info. valueThe value. DeleteNodeFromSplayTree() deletes a node from the splay-tree. The format of the DeleteNodeFromSplayTree method is:
WizardBooleanType DeleteNodeFromSplayTree(SplayTreeInfo *splay_tree,
const void *key)
A description of each parameter follows: splay_treeThe splay-tree info. keyThe key. DestroySplayTree() destroys the splay-tree. The format of the DestroySplayTree method is: SplayTreeInfo *DestroySplayTree(SplayTreeInfo *splay_tree) A description of each parameter follows: splay_treeThe splay tree. GetNextKeyInSplayTree() gets the next key in the splay-tree. The format of the GetNextKeyInSplayTree method is: void *GetNextKeyInSplayTree(SplayTreeInfo *splay_tree) A description of each parameter follows: splay_treeThe splay tree. keyThe key. GetNextValueInSplayTree() gets the next value in the splay-tree. The format of the GetNextValueInSplayTree method is: void *GetNextValueInSplayTree(SplayTreeInfo *splay_tree) A description of each parameter follows: splay_treeThe splay tree. keyThe key. GetValueFromSplayTree() gets a value from the splay-tree by its key. The format of the GetValueFromSplayTree method is: void *GetValueFromSplayTree(SplayTreeInfo *splay_tree,const void *key) A description of each parameter follows: splay_treeThe splay tree. keyThe key. GetNumberOfNodesInSplayTree() returns the number of nodes in the splay-tree. The format of the GetNumberOfNodesInSplayTree method is:
unsigned long GetNumberOfNodesInSplayTree(
const SplayTreeInfo *splay_tree)
A description of each parameter follows: splay_treeThe splay tree. IterateOverSplayTree() iterates over the splay-tree. The format of the IterateOverSplayTree method is:
int IterateOverSplayTree(SplayTreeInfo *splay_tree,
int (*method)(NodeInfo *,void *),const void *value)
A description of each parameter follows: splay_treeThe splay-tree info. methodThe method. valueThe value. NewSplayTree() returns a pointer to a SplayTreeInfo structure initialized to default values. The format of the NewSplayTree method is:
SplayTreeInfo *NewSplayTree(int (*compare)(const void *,const void *),
void *(*relinquish_key)(void *),void *(*relinquish_value)(void *))
A description of each parameter follows: compareThe compare method. relinquish_keyThe key deallocation method, typically RelinquishWizardMemory(), called whenever a key is removed from the splay-tree. relinquish_valueThe value deallocation method; typically RelinquishWizardMemory(), called whenever a value object is removed from the splay-tree. RemoveNodeByValueFromSplayTree() removes a node by value from the splay-tree and returns its key. The format of the RemoveNodeByValueFromSplayTree method is:
void *RemoveNodeByValueFromSplayTree(SplayTreeInfo *splay_tree,
const void *value)
A description of each parameter follows: splay_treeThe splay-tree info. valueThe value. RemoveNodeFromSplayTree() removes a node from the splay-tree and returns its value. The format of the RemoveNodeFromSplayTree method is: void *RemoveNodeFromSplayTree(SplayTreeInfo *splay_tree,const void *key) A description of each parameter follows: splay_treeThe splay-tree info. keyThe key. ResetSplayTreeIterator() resets the splay-tree iterator. Use it in conjunction with GetNextValueInSplayTree() to iterate over all the nodes in the splay-tree. The format of the ResetSplayTreeIterator method is: ResetSplayTreeIterator(SplayTreeInfo *splay_tree) A description of each parameter follows: splay_treeThe splay tree. SplaySplayTree() splays the splay-tree. The format of the SplaySplayTree method is:
void SplaySplayTree(SplayTreeInfo *splay_tree,const void *key,
NodeInfo **node,NodeInfo **parent,NodeInfo **grandparent)
A description of each parameter follows: splay_treeThe splay-tree info. keyThe key. nodeThe node. parentThe parent node. grandparentThe grandparent node. |