DisjointSets

problemutils.classes.graphs.DisjointSets
See theDisjointSets companion object
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

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

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.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

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