Attributes
- Companion
- object
- Source
- DisjointSets.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Add a value to this datastructure
Add a value to this datastructure
Value parameters
- v
-
Value to be added
Attributes
- Returns
-
New DisjointSets 's state.
- Source
- DisjointSets.scala
Checks whether or not a value is present in the disjoint sets collection
Checks whether or not a value is present in the disjoint sets collection
Value parameters
- v
-
label to be found within the data structure
Attributes
- Returns
-
Check result
- Source
- DisjointSets.scala
Find the label of the provided value.
Find the label of the provided value.
Value parameters
- v
-
Value whose label is to be found
Attributes
- Returns
-
(new state, 'None' if the value doesn't exist, Some(label) otherwise)
- Source
- DisjointSets.scala
Generates a map from labels to sets from the current DisjointSets.
Generates a map from labels to sets from the current DisjointSets.
Attributes
- Source
- DisjointSets.scala
Joins two disjoint sets if both are contained by this DisjointSets
Joins two disjoint sets if both are contained by this DisjointSets
Value parameters
- a
-
Set
a
- b
-
Set
b
Attributes
- Returns
-
(new DisjointSets with updated state,
true
if Both labels are contained and joined ) - Source
- DisjointSets.scala