Documentation of 'bayesnet.internal.jayes.util.UnionFind' Java class
UnionFind
bayesnet.internal.jayes.util

Class UnionFind



  • public class UnionFind
    extends java.lang.Object
    Disjoint Set Datastructure, uses Union by Rank and Path Compression heuristics.
    See Also:
    "Efficiency of a Good But Not Linear Set Union Algorithm" (Tarjan, 1975)
    • Constructor Detail

      • UnionFind

        public UnionFind()
    • Method Detail

      • find

        public UnionFind find()
        Returns:
        the set that contains this element
      • merge

        public void merge(UnionFind other)
        Unites the sets. In equal rank case, the other set is chosen as the new root.
      • rank

        public int rank()
        Returns:
        upper bound for the height of the tree rooted at this element
      • createArray

        public static UnionFind[] createArray(int size)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.