GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Paranoid::Data::AVLTree::AVLNode(3) User Contributed Perl Documentation Paranoid::Data::AVLTree::AVLNode(3)

Paranoid::Data::AVLTree::AVLNode - AVL Tree Node Object Class

$Id: lib/Paranoid/Data/AVLTree/AVLNode.pm, 2.08 2020/12/31 12:10:06 acorliss Exp $

    $node   = Paranoid::Data::AVLTree::AVLNode->new($key, $val);
    $record = $node->ioRecord;
    $key    = $node->key;
    $val    = $node->val;
    $rv     = $node->setVal($val);
    $ref    = $node->right;
    $rv     = $node->setRight($node);
    $ref    = $node->left;
    $rv     = $node->setLeft($node);
    $rv     = $node->incrRHeight;
    $rv     = $node->incrLHeight;
    $rv     = $node->addRHeight($n);
    $rv     = $node->addLHeight($n);
    $rv     = $node->decrRHeight;
    $rv     = $node->decrLHeight;
    $balance = $node->balance;
    $count  = $node->count;
    $height = $node->height;
    $height = $node->rHeight;
    $height = $node->lHeight;
    $rv     = $node->updtHeights;
    @crefs  = $node->children;

This class provides the core data objects that comprise an AVL-balanced tree.

    $node   = Paranoid::Data::AVLTree::AVLNode->new($key, $val);

This method creates a new AVLNode object. Like hashes, the key must be defined, but it cannot be a zero-length string. In those cases, this method will return undef.

    $record = $node->ioRecord;

This method creates a string representation of the node for use in spooling to disk.

    $key    = $node->key;

This method returns the key for the node.

    $val    = $node->val;

This method returns the associated value for the node. It can be undef.

    $rv     = $node->setVal($val);

This method sets the assocated value for the node.

    $ref    = $node->right;

This method retrieves a reference to the next right-side node in the branch, if any.

    $rv     = $node->setRight($node);

This method sets/removes the reference to the next right-side node in the branch.

    $ref    = $node->left;

This method retrieves a reference to the next left-side node in the branch, if any.

    $rv     = $node->setLeft($node);

This method sets/removes the reference to the next left-side node in the branch.

    $rv     = $node->incrRHeight;

This method increments the height counter for the ride-side sub-branch.

    $rv     = $node->incrLHeight;

This method increments the height counter for the left-side sub-branch.

    $rv     = $node->addRHeight($n);

This method adds the passed value to the height counter for the right-side sub-branch.

    $rv     = $node->addLHeight($n);

This method adds the passed value to the height counter for the left-side sub-branch.

    $rv     = $node->decrRHeight;

This method decrements the height counter for the right-side sub-branch.

    $rv     = $node->decrLHeight;

This method decrements the height counter for the left-side sub-branch.

    $balance = $node->balance;

This returns the node balance, which is a relative indidcator of the disparity in heights of the right & left sub-branches. A negative number denotes a longer left-side branch, zero means equal sub-branch heights, and a positive integer denotes a longer right-side branch.

    $count  = $node->count;

This method returns the count of nodes, including all nodes in linked sub-branches.

    $height = $node->height;

This method returns the longest height of the node and any attached sub-branches.

    $height = $node->rHeight;

This method returns the height of the right-side sub-branch, or zero if there is no linked branch.

    $height = $node->lHeight;

This method returns the height of the left-side sub-branch, or zero if there is no linked branch.

    $rv     = $node->updtHeights;

This method performs a brute force recalculation of all attached sub-branches.

    @crefs  = $node->children;

This returns references to the next nodes in any attadhed sub-branches.

o
Carp
o
Paranoid

Arthur Corliss (corliss@digitalmages.com)

This software is free software. Similar to Perl, you can redistribute it and/or modify it under the terms of either:

  a)     the GNU General Public License
         <https://www.gnu.org/licenses/gpl-1.0.html> as published by the 
         Free Software Foundation <http://www.fsf.org/>; either version 1
         <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version
         <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
  b)     the Artistic License 2.0
         <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: No trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. However, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)

2020-12-31 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.