Connectivity

com.phasmidsoftware.gryphon.adjunct.Connectivity
See theConnectivity companion trait
object Connectivity

The Connectivity object provides factory methods for creating instances of Connectivity using different strategies for managing disjoint sets. These strategies include lazy and optimized implementations, each employing the "Weighted Quick Union" algorithm for efficient operations.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def createLazy[V](vertices: V*): Connectivity[V]

Creates a new Connectivity instance using the lazy implementation strategy. Each provided element will represent a separate component initially, optimized using the "Weighted Quick Union" algorithm.

Creates a new Connectivity instance using the lazy implementation strategy. Each provided element will represent a separate component initially, optimized using the "Weighted Quick Union" algorithm.

Value parameters

vertices

the elements to initialize as individual components in the Connectivity instance.

Attributes

Returns

a new Connectivity instance containing the given elements as disjoint sets.

def createOptimized[V](vertices: V*): Connectivity[V]

Creates a new Connectivity instance using the optimized implementation strategy. Each provided element will represent a separate component initially, optimized using the "Weighted Quick Union" algorithm.

Creates a new Connectivity instance using the optimized implementation strategy. Each provided element will represent a separate component initially, optimized using the "Weighted Quick Union" algorithm.

Value parameters

vertices

the elements to initialize as individual components in the Connectivity instance.

Attributes

Returns

a new Connectivity instance containing the given elements as disjoint sets.