com.hp.hpl.jena.ontology
Class OntTools.DisjointSet
java.lang.Object
com.hp.hpl.jena.ontology.OntTools.DisjointSet
- Enclosing class:
- OntTools
public static class OntTools.DisjointSet
- extends java.lang.Object
A simple representation of disjoint sets
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OntTools.DisjointSet
public OntTools.DisjointSet(Resource node)
getNode
public Resource getNode()
getParent
public OntTools.DisjointSet getParent()
setParent
public void setParent(OntTools.DisjointSet parent)
getRank
public int getRank()
incrementRank
public void incrementRank()
getAncestor
public OntTools.DisjointSet getAncestor()
setAncestor
public void setAncestor(OntTools.DisjointSet anc)
setBlack
public void setBlack()
isBlack
public boolean isBlack()
used
public boolean used()
setUsed
public void setUsed()
find
public OntTools.DisjointSet find()
- The find operation collapses the pointer to the root parent, which is
one of Tarjan's standard optimisations.
- Returns:
- The representative of the union containing this set
union
public void union(OntTools.DisjointSet y)
- The union of two sets
- Parameters:
y
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- A string representation of this set for debugging
- See Also:
Object.toString()
toShortString
public java.lang.String toShortString()
Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP