Class OntTools.DisjointSet

  • Enclosing class:
    OntTools

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

      • DisjointSet

        public DisjointSet​(Resource node)
    • Method Detail

      • getRank

        public int getRank()
      • incrementRank

        public void incrementRank()
      • 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
      • 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()