DisjointSets

case class DisjointSets[V](var nodes: V*)

A generic mutable implementation of the disjoint sets data structure.

Value parameters:
nodes

all the vertices currently tracked by this data structure

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def add(v: V): Unit
def findSet(v: V): V
def makeUnion(a: V, b: V): Unit
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

val parents: Map[V, V]
val rank: Map[V, Int]