public class AVLIntervalTree.Node
extends java.lang.Object
implements java.io.Serializable
AVL tree nodes implement all the logical structure of the
tree. Nodes are created by the AVLTree
class.
The nodes are not independant from each other but must obey specific balancing constraints and the tree structure is rearranged as elements are inserted or deleted from the tree. The creation, modification and tree-related navigation methods have therefore restricted access. Only the order-related navigation, reading and delete methods are public.
AVLIntervalTree
,
Serialized FormModifier and Type | Field and Description |
---|---|
Range |
element
Element contained in the current node.
|
AVLIntervalTree.Node |
left
Left sub-tree.
|
double |
max
The maximum value of the subtree.
|
AVLIntervalTree.Node |
parent
Parent tree.
|
AVLIntervalTree.Node |
right
Right sub-tree.
|
agents.AVLIntervalTree.Skew |
skew
Skew factor.
|
Modifier and Type | Method and Description |
---|---|
void |
allComputeMax()
All compute max.
|
void |
delete()
Delete the node from the tree.
|
Range |
getElement()
Get the contained element.
|
double |
getMax()
Gets the max.
|
AVLIntervalTree.Node |
getNext()
Get the node containing the next larger or equal element.
|
AVLIntervalTree.Node |
getPrevious()
Get the node containing the next smaller or equal element.
|
void |
resetMax()
Reset max.
|
void |
setMax(double max)
Sets the max.
|
public Range element
public AVLIntervalTree.Node left
public AVLIntervalTree.Node right
public AVLIntervalTree.Node parent
public agents.AVLIntervalTree.Skew skew
public double max
public void resetMax()
public void allComputeMax()
public double getMax()
public void setMax(double max)
max
- the new maxpublic Range getElement()
public AVLIntervalTree.Node getPrevious()
getNext()
public AVLIntervalTree.Node getNext()
getPrevious()
public void delete()