Package qilin.util

Class UnionFindSet<E>

java.lang.Object
qilin.util.UnionFindSet<E>

public class UnionFindSet<E> extends Object
  • Constructor Details

    • UnionFindSet

      public UnionFindSet(Collection<E> elems)
  • Method Details

    • union

      public boolean union(E e1, E e2)
    • isConnected

      public boolean isConnected(E e1, E e2)
    • find

      public E find(E e)
    • numberOfSets

      public int numberOfSets()
    • getDisjointSets

      public Collection<Set<E>> getDisjointSets()