Tree::Binary::Search::Node - A node for a Tree::Binary::Search tree
This is a subclass of Tree::Binary and is mostly used by Tree::Binary::Search.
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.
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.
This is used by Tree::Binary::Search when it need to re-root a tree due to a deletion.
Makes sure that the node key is cloned as well.
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.
stevan little, <email@example.com>
Copyright 2004, 2005 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.