trait DisjointSetUnion[V] extends IterableOnce[V]
- Alphabetic
- By Inheritance
- DisjointSetUnion
- IterableOnce
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def find(v: Int): (V, DisjointSetUnion[V])
Finds a value of the representative of the group containing the given member index
Finds a value of the representative of the group containing the given member index
- Exceptions thrown
java.lang.IndexOutOfBoundsException
if the index is out of bounds- Note
Time Complexity: O(a(N)) amortized
- abstract def groupCount: Int
Returns the number of groups
Returns the number of groups
- Note
Time Complexity: O(1)
- abstract def groups: Set[Set[Int]]
Return groups containing its member indices
Return groups containing its member indices
- Note
Time Complexity: ~= O(a(N) N)
- abstract def isSame(u: Int, v: Int): (Boolean, DisjointSetUnion[V])
Returns true if the same group containing the given member indices
Returns true if the same group containing the given member indices
- Exceptions thrown
java.lang.IndexOutOfBoundsException
if the index is out of bounds- Note
Time Complexity: O(a(N)) amortized
- abstract def iterator: Iterator[V]
- Definition Classes
- IterableOnce
- abstract def size: Int
Returns the number of members
Returns the number of members
- Note
Time Complexity: O(1)
- abstract def unite(u: Int, v: Int): DisjointSetUnion[V]
Merge two groups into a single group containing the given member indices
Merge two groups into a single group containing the given member indices
- Exceptions thrown
java.lang.IndexOutOfBoundsException
if the index is out of bounds- Note
Time Complexity: O(a(N)) amortized
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def knownSize: Int
- Definition Classes
- IterableOnce
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[V, S]): S
- Definition Classes
- IterableOnce
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])