| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jutil.java.collections.TransitiveClosure
An operator that calculates the transitive closure of a graph of objects.
 
 Objects of this class calculate the transitive closure of a graph,
 defined by public Set getConnectedNodes(Object node),
 starting from a set of nodes or a single start node.
| Field Summary | |
| static java.lang.String | CVS_REVISION | 
| Constructor Summary | |
| TransitiveClosure() | |
| Method Summary | |
|  java.util.Set | closure(java.lang.Object startNode)The transitive closure, starting from public Set getConnectedNodes(Object node). | 
|  java.util.Set | closureFromAll(java.util.Set startSet)The transitive closure, starting from public Set getConnectedNodes(Object node). | 
| abstract  java.util.Set | getConnectedNodes(java.lang.Object node)This method needs to be implemented by subclasses, so that it returns the nodes connected to | 
|  boolean | isNaiveClosure(java.util.Set startSet,
               java.util.Set naiveClosureSet)Transitive closure is a recursive definition. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final java.lang.String CVS_REVISION
| Constructor Detail | 
public TransitiveClosure()
| Method Detail | 
public abstract java.util.Set getConnectedNodes(java.lang.Object node)
This method needs to be implemented by subclasses, so that it returns
 the nodes connected to 
node - The node to get the connected nodes for.
public final boolean isNaiveClosure(java.util.Set startSet,
                                    java.util.Set naiveClosureSet)
closureFromAll(java.util.Set)
public final java.util.Set closureFromAll(java.util.Set startSet)
                                   throws java.util.ConcurrentModificationException
The transitive closure, starting from public Set getConnectedNodes(Object node).
startSet - The set of nodes to start the transitive closure from.
         This set is not changed.
public final java.util.Set closure(java.lang.Object startNode)
                            throws java.util.ConcurrentModificationException
The transitive closure, starting from public Set getConnectedNodes(Object node).
startNode - The node to start the transitive closure from.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||