Tree::Binary::Search::Node - A node for a Tree::Binary::Search tree
use Tree::Binary::Search::Node;
This is a subclass of Tree::Binary and is mostly used by Tree::Binary::Search.
- new ($node_key, $node_value)
- The constructor takes a $node_key and a
$node_value. The key is used by
Tree::Binary::Search to order the nodes in the tree. Both arguments are
required, and exception is thrown if they are not present.
- getNodeKey
- Returns the node key as set in the constructor. Node keys are
write-once-read-only values, if you could change the node key, it would
mess up the entire search tree.
- makeRoot
- This is used by Tree::Binary::Search when it need to re-root a tree due to
a deletion.
- clone
- Makes sure that the node key is cloned as well.
- Reference node keys
- Right now, there is nothing preventing you from using anything you want as
a node key as long as you create the proper comparison function in
Tree::Binary::Search. I would like to test this more, and possibly write
some code to faciliate it.
None that I am aware of. Of course, if you find a bug, let me know, and I will
be sure to fix it.
See the CODE COVERAGE section of Tree::Binary for details.
<https://github.com/ronsavage/Tree-Binary>
stevan little, <stevan@iinteractive.com>
Copyright 2004, 2005 by Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.