java.lang.Object
org.apache.jena.ontology.OntTools.DisjointSet
- Enclosing class:
- OntTools
A simple representation of disjoint sets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind()The find operation collapses the pointer to the root parent, which is one of Tarjan's standard optimisations.getNode()intgetRank()voidbooleanisBlack()voidvoidsetBlack()voidsetParent(OntTools.DisjointSet parent) voidsetUsed()toString()voidThe union of two setsbooleanused()
-
Constructor Details
-
DisjointSet
-
-
Method Details
-
getNode
-
getParent
-
setParent
-
getRank
public int getRank() -
incrementRank
public void incrementRank() -
getAncestor
-
setAncestor
-
setBlack
public void setBlack() -
isBlack
public boolean isBlack() -
used
public boolean used() -
setUsed
public void setUsed() -
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
The union of two sets- Parameters:
y-
-
toString
-
toShortString
-