|
||||||||
| 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
A partition implemented as a forest of trees.
| Inner Class Summary | |
protected class |
PartitionAsForest.PartitionTree
A node in a partition tree. |
| Field Summary | |
protected PartitionAsForest.PartitionTree[] |
array
Array of partition trees. |
| Fields inherited from class Opus5.AbstractSet |
universeSize |
| Fields inherited from class Opus5.AbstractContainer |
count |
| Fields inherited from interface Opus5.Partition |
copyright |
| Constructor Summary | |
PartitionAsForest(int n)
Constructs a PartitionAsForest
with the specified number of elements in its universal set. |
|
| Method Summary | |
void |
accept(Visitor visitor)
Accepts a visitor and makes it visit the elements of this partition. |
protected void |
checkArguments(PartitionAsForest.PartitionTree s,
PartitionAsForest.PartitionTree t)
Checks whether the specified partition trees are distinct, are both members of this partition, and are both roots of their respective trees. |
protected int |
compareTo(Comparable arg)
Compares this partition with the specified comparable object. |
Set |
difference(Set set)
Undefined for partitions. |
Comparable |
find(Comparable object)
Finds the element of this partition that contains the specified element of the universal set. |
Set |
find(int item)
Finds the element of this partition that contains the specified element of the universal set. |
Enumeration |
getEnumeration()
Returns an enumeration that enumerates the elements of this partition. |
protected void |
insert(int i)
Undefined for partitions. |
Set |
intersection(Set set)
Undefined for partitions. |
boolean |
isEQ(Set set)
Tests whether this partition is equal to the specified set. |
boolean |
isMember(Comparable object)
Tests whether the given comparable object is a member of this partition. |
protected boolean |
isMember(int i)
Undefined for partitions. |
boolean |
isSubset(Set set)
Tests whether this partition is a subset of the specified set. |
void |
join(Set s,
Set t)
Joins the specified elements of this partition. |
void |
purge()
Purges the partition, placing each element of the universal set into its own element of the partition. |
Set |
union(Set set)
Undefined for partitions. |
protected void |
withdraw(int i)
Undefined for partitions. |
| Methods inherited from class Opus5.AbstractSet |
insert, withdraw |
| Methods inherited from class Opus5.AbstractContainer |
getCount, hashCode, isEmpty, isFull, toString |
| 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 |
insert, withdraw |
| Methods inherited from interface Opus5.Container |
getCount, isEmpty, isFull |
| Methods inherited from interface Opus5.Comparable |
compare, isEQ, isGE, isGT, isLE, isLT, isNE |
| Field Detail |
protected PartitionAsForest.PartitionTree[] array
| Constructor Detail |
public PartitionAsForest(int n)
PartitionAsForest
with the specified number of elements in its universal set.n - The size of elements in the universal set.| Method Detail |
public void purge()
purge in interface Containerpublic Set find(int item)
find in interface Partitionitem - The element of the universal set for which to look.public Comparable find(Comparable object)
Int instance
that specifies the element of the universal set.find in interface SearchableContainerfind in class AbstractSetobject - An Int that specifies the
desired element of the universal set.
protected void checkArguments(PartitionAsForest.PartitionTree s,
PartitionAsForest.PartitionTree t)
s - A partition tree.t - A partition tree.java.lang.IllegalArgumentException - If any condition above is violated.
public void join(Set s,
Set t)
join in interface Partitions - An element of this partition.t - An element of this partition.public boolean isMember(Comparable object)
isMember in interface SearchableContainerisMember in class AbstractSetobject - The object for which to look.public void accept(Visitor visitor)
accept in interface Containeraccept in class AbstractContainervisitor - The visitor to accept.protected 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 AbstractSetInvalidOperationException - Always.public Enumeration getEnumeration()
getEnumeration in interface ContainerMethodNotImplemented - Always.public Set union(Set set)
union in interface SetInvalidOperationException - Always.public Set intersection(Set set)
intersection in interface SetInvalidOperationException - Always.public Set difference(Set set)
difference in interface SetInvalidOperationException - Always.public boolean isEQ(Set set)
isEQ in interface SetMethodNotImplemented - Always.public boolean isSubset(Set set)
isSubset in interface SetMethodNotImplemented - Always.protected int compareTo(Comparable arg)
compareTo in class AbstractObjectobject - The object with which this partition is compared.MethodNotImplemented - Always.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||