|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--Opus5.AbstractObject
|
+--Opus5.AbstractContainer
|
+--Opus5.AbstractSearchableContainer
|
+--Opus5.AbstractSet
|
+--Opus5.PartitionAsForest.PartitionTree
A node in a partition tree. A partition tree is an element of a partition.
Partition| Field Summary | |
protected int |
item
An element of the universal set. |
protected PartitionAsForest.PartitionTree |
parent
The parent of this node. |
protected int |
rank
The rank of this node. |
| Fields inherited from class Opus5.AbstractSet |
universeSize |
| Fields inherited from class Opus5.AbstractContainer |
count |
| Fields inherited from interface Opus5.Set |
copyright |
| Fields inherited from interface Opus5.Tree |
copyright |
| Constructor Summary | |
PartitionAsForest.PartitionTree(int item)
Constructs a PartitionTree
for the specified element of the universal set
a the specified size of universal set. |
|
| Method Summary | |
void |
breadthFirstTraversal(Visitor visitor)
Does a breadth-first traversal of this partition tree. |
protected int |
compareTo(Comparable object)
Compares this partition tree node with the specified comparable object. |
void |
depthFirstTraversal(PrePostVisitor visitor)
Does a depth-first traversal of this partition tree. |
Set |
difference(Set set)
Returns the difference between the set represented by this partition tree and the specified set. |
int |
getDegree()
Returns the degree of this partition tree node. |
Enumeration |
getEnumeration()
Returns an enumeration that enumerates the elements of this partition tree. |
int |
getHeight()
Returns the height (rank) of this partition tree. |
java.lang.Object |
getKey()
Returns the key in this partition tree node. |
Tree |
getSubtree(int i)
Returns the specified subtree of this partition tree node. |
int |
hashCode()
Returns a hashcode for this partition tree node. |
protected void |
insert(int i)
Undefined for partition trees. |
Set |
intersection(Set set)
Returns the intersection of the set represented by this partition tree and the specified set. |
boolean |
isEmpty()
Tests whether this partition tree node is empty. |
boolean |
isEQ(Set set)
Tests whether the set represented by this partition tree is equal to the specified set. |
boolean |
isLeaf()
Tests whether this partition tree node is a leaf node. |
protected boolean |
isMember(int i)
Tests whether the specified item is an element of this partition tree. |
protected boolean |
IsMemberOf(PartitionAsForest partition)
Tests whether this partition tree is an element of the specified partition. |
boolean |
isSubset(Set set)
Tests whether the set represented by this partition tree is a subset of the specified set. |
void |
purge()
Purges this partition tree node, making it into a singleton. |
protected void |
setCount(int count)
Sets the count field to the specified value. |
java.lang.String |
toString()
Returns a string representation of this partition tree. |
Set |
union(Set set)
Returns the union of the set represented by this partition tree and the specified set. |
protected void |
withdraw(int i)
Undefined for partition trees. |
| Methods inherited from class Opus5.AbstractSet |
find, insert, isMember, withdraw |
| Methods inherited from class Opus5.AbstractContainer |
accept, getCount, isFull |
| Methods inherited from class Opus5.AbstractObject |
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Opus5.SearchableContainer |
find, insert, isMember, withdraw |
| Methods inherited from interface Opus5.Container |
accept, getCount, isFull |
| Methods inherited from interface Opus5.Comparable |
compare, isEQ, isGE, isGT, isLE, isLT, isNE |
| Field Detail |
protected int item
protected PartitionAsForest.PartitionTree parent
protected int rank
| Constructor Detail |
public PartitionAsForest.PartitionTree(int item)
PartitionTree
for the specified element of the universal set
a the specified size of universal set.item - An element of the universal set.| Method Detail |
public void purge()
purge in interface Containerprotected void setCount(int count)
count - The desired value.protected boolean IsMemberOf(PartitionAsForest partition)
partition - The specified partition.public int getHeight()
getHeight in interface Treepublic java.lang.Object getKey()
getKey in interface Treeprotected int compareTo(Comparable object)
PartitionTree instance.
The result is obtained by comparing the keys
in the respective partition tree nodes.compareTo in class AbstractObjectobject - The comparable object with which to compare this
partition tree.public int hashCode()
hashCode in class AbstractContainerpublic java.lang.String toString()
toString in class AbstractContainerprotected void insert(int i)
insert in class AbstractSetInvalidOperationException - Always.protected void withdraw(int i)
withdraw in class AbstractSetInvalidOperationException - Always.protected boolean isMember(int i)
isMember in class AbstractSetMethodNotImplemented - Always.public boolean isLeaf()
isLeaf in interface TreeMethodNotImplemented - Always.public boolean isEmpty()
isEmpty in interface ContainerisEmpty in class AbstractContainerpublic Tree getSubtree(int i)
getSubtree in interface TreeMethodNotImplemented - Always.public int getDegree()
getDegree in interface TreeMethodNotImplemented - Always.public void depthFirstTraversal(PrePostVisitor visitor)
depthFirstTraversal in interface TreeMethodNotImplemented - Always.public void breadthFirstTraversal(Visitor visitor)
breadthFirstTraversal in interface TreeMethodNotImplemented - Always.public Set union(Set set)
union in interface SetMethodNotImplemented - Always.public Set intersection(Set set)
intersection in interface SetMethodNotImplemented - Always.public Set difference(Set set)
difference in interface SetMethodNotImplemented - Always.public boolean isEQ(Set set)
isEQ in interface SetMethodNotImplemented - Always.public boolean isSubset(Set set)
isSubset in interface SetMethodNotImplemented - Always.public Enumeration getEnumeration()
getEnumeration in interface ContainerMethodNotImplemented - Always.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||