Class OntTools.DisjointSet

java.lang.Object
org.apache.jena.ontology.OntTools.DisjointSet
Enclosing class:
OntTools

public static class OntTools.DisjointSet extends Object
A simple representation of disjoint sets
  • Constructor Details

    • DisjointSet

      public DisjointSet(Resource node)
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of this set for debugging
      See Also:
    • toShortString

      public String toShortString()