| Constructor and Description |
|---|
PQTreeNode(PQNodeType type)
Construct a PQ-tree node of the given type.
|
PQTreeNode(PQNodeType type,
java.lang.Object content)
Constructs a PQ-tree node of the given type with the specified content
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(PQTreeNode node)
Adds a child node to the current node
|
void |
addChild(PQTreeNode node,
int index)
Adds child node to the current node at the specified index
|
int |
childrenCount()
Only used for P-nodes
|
void |
decrementPertinentChildCount()
Decrements pertinent children count
|
int |
emptyChildrenCount()
Only used for P-nodes
|
int |
fullChildrenCount()
Only used for P-nodes
|
java.util.List<PQTreeNode> |
getChildren() |
java.lang.Object |
getContent() |
java.util.List<PQTreeNode> |
getEmptyChildren() |
java.util.List<PQTreeNode> |
getFullChildren() |
PQNodeLabel |
getLabel() |
PQNodeMark |
getMark() |
PQTreeNode |
getParent() |
java.util.List<PQTreeNode> |
getPartialChildren() |
int |
getPertinendChildCount() |
int |
getPertinentLeafCount() |
java.awt.Dimension |
getSize() |
PQNodeType |
getType() |
java.lang.Object |
getVirtualEdge() |
void |
incrementPertinentChildCount()
Increases pertinent children count
|
void |
labelAsEmpty()
Changes the label to empty
while updating the lists of the
empty, partial and full children
|
void |
labelAsFull()
Changes the label to full
while updating the lists of the
empty, partial and full children
|
void |
labelAsPartial(PQNodeLabel label)
Changes the label to partial
while updating the lists of the
empty, partial and full children
|
PQNodeOrderValid |
orderValidUpToOnePartial()
Checks if the order of the children is empty, singly partial, full
Some labels could be missing
Reversal is possible
|
PQNodeOrderValid |
orderValidUpToTwoPartial()
Checks if the order of the children is empty, singly partial, full, empty partial, empty
Some labels could be missing
Reversal is possible
|
int |
partialChildrenCount()
Only used for P-nodes
|
void |
removeChild(PQTreeNode node)
Removes a child node from the current one
|
void |
setChildren(java.util.List<PQTreeNode> children) |
void |
setContent(java.lang.Object content) |
void |
setLabel(PQNodeLabel label) |
void |
setMark(PQNodeMark mark) |
void |
setParent(PQTreeNode parent) |
void |
setPertinendChildCount(int pertinendChildCount) |
void |
setPertinentLeafCount(int pertinentLeafCount) |
void |
setSize(java.awt.Dimension size) |
void |
setType(PQNodeType type) |
void |
setVirtualEdge(java.lang.Object virtualEdge) |
java.lang.String |
toString() |
public PQTreeNode(PQNodeType type)
type - Type of the nodepublic PQTreeNode(PQNodeType type, java.lang.Object content)
type - Type of the nodecontent - Node's contentpublic int childrenCount()
public int fullChildrenCount()
public int partialChildrenCount()
public int emptyChildrenCount()
public void incrementPertinentChildCount()
public void decrementPertinentChildCount()
public void addChild(PQTreeNode node)
node - Child nodepublic PQNodeOrderValid orderValidUpToOnePartial()
public PQNodeOrderValid orderValidUpToTwoPartial()
public void addChild(PQTreeNode node, int index)
node - Child nodeindex - Index where the node should be addedpublic void removeChild(PQTreeNode node)
node - Child nodepublic void labelAsFull()
public void labelAsEmpty()
public void labelAsPartial(PQNodeLabel label)
label - Singly partial or doubly partialpublic PQNodeType getType()
public void setType(PQNodeType type)
type - Node's type to setpublic java.lang.Object getContent()
getContent in interface Vertexpublic void setContent(java.lang.Object content)
setContent in interface Vertexcontent - Node's content to setpublic java.awt.Dimension getSize()
public void setSize(java.awt.Dimension size)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<PQTreeNode> getChildren()
public void setChildren(java.util.List<PQTreeNode> children)
children - Children nodes to setpublic PQTreeNode getParent()
public void setParent(PQTreeNode parent)
parent - Parent to setpublic java.util.List<PQTreeNode> getFullChildren()
public PQNodeLabel getLabel()
public void setLabel(PQNodeLabel label)
label - Label to setpublic PQNodeMark getMark()
public void setMark(PQNodeMark mark)
mark - Mark to setpublic java.util.List<PQTreeNode> getPartialChildren()
public int getPertinendChildCount()
public void setPertinendChildCount(int pertinendChildCount)
pertinendChildCount - The number of pertinent childrenpublic int getPertinentLeafCount()
public void setPertinentLeafCount(int pertinentLeafCount)
pertinentLeafCount - The number of pertinent leaves to setpublic java.util.List<PQTreeNode> getEmptyChildren()
public java.lang.Object getVirtualEdge()
public void setVirtualEdge(java.lang.Object virtualEdge)
virtualEdge - The virtual edge to set