java.lang.Object
org.apache.jena.ontology.OntTools.DisjointSet
- Enclosing class:
- OntTools
A simple representation of disjoint sets
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfind()
The find operation collapses the pointer to the root parent, which is one of Tarjan's standard optimisations.getNode()
int
getRank()
void
boolean
isBlack()
void
void
setBlack()
void
setParent
(OntTools.DisjointSet parent) void
setUsed()
toString()
void
The union of two setsboolean
used()
-
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
-