| Package | Description |
|---|---|
| javatools.datatypes |
| Modifier and Type | Class and Description |
|---|---|
class |
PQRTree.Leaf
A node that has a value
|
| Modifier and Type | Field and Description |
|---|---|
protected PQRTree.Node |
PQRTree.Node.parent
Points to the parent
|
protected PQRTree.Node |
PQRTree.root
Holds the root of the tree
|
| Modifier and Type | Field and Description |
|---|---|
protected List<PQRTree.Node> |
PQRTree.Node.children
Points to the children
|
| Modifier and Type | Method and Description |
|---|---|
PQRTree.Node |
PQRTree.Node.child(int pos)
Returns the child at a position
|
PQRTree.Node |
PQRTree.Node.colorAndGetLCA(int numS)
Colors the current node and all ancestors, returns the LCA.
|
PQRTree.Node |
PQRTree.Node.firstChild()
Returns the first child
|
PQRTree.Node |
PQRTree.Node.lastChild()
Returns the last child
|
PQRTree.Node |
PQRTree.Node.moveChildrenAway(int childPos)
MOves children away from the current node, returns new LCA
|
| Modifier and Type | Method and Description |
|---|---|
void |
PQRTree.Node.addChild(PQRTree.Node n)
Adds a new child
|
void |
PQRTree.Node.addChild(PQRTree.Node n,
int pos)
Adds a new child at a given position
|
void |
PQRTree.Node.makeChildGrandchild(int pos,
PQRTree.Node father)
Makes the child at pos a child of father
|
void |
PQRTree.Node.makeChildGrandchild(int pos,
PQRTree.Node father,
int newPos)
Makes the child at pos a child of father at newPos
|
void |
PQRTree.Node.makeGrandchildChild(PQRTree.Node father,
int oldPos,
int newPos)
Makes the child of father at oldPos a child of this at newPos
|
Copyright © 2018. All rights reserved.