Packages

c

ap.basetypes

UnionFind

class UnionFind[D] extends Cloneable

A simple, textbook implementation of a union-find data structure.

Linear Supertypes
Cloneable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnionFind
  2. Cloneable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new UnionFind()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(d: D): D

    Find the representing element for d.

    Find the representing element for d. Two elements belong to the same set iff they have the same representative.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): UnionFind[D]
    Definition Classes
    UnionFind → AnyRef
  7. def contains(d: D): Boolean

    Check whether an element is already present in the forest.

  8. def elements: Iterator[D]

    Iterator over all elements of this forest.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def makeSet(d: D): Unit

    Add a new element to the forest.

  15. def makeSetIfNew(d: D): Unit

    Add a new element to the forest; the operation has no effect if the element is already present in the forest.

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. def representatives: Iterator[D]

    Iterator over the elements representing sets; exactly one object will be enumerated for each set.

  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    UnionFind → AnyRef → Any
  22. def union(d: D, e: D): Unit

    Join two sets.

  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped