Trait to model the behavior of a disjoint set. Thus, we provide put, connect, getDisjointSet, and size in addition to isConnected (from the super-trait).
The purpose of having a disjoint set representation of a "graph" is so that we can answer connectivity questions in close to O(1) time, rather than the O(n + m) time required for a full traversal of an edge-connected graph. The most typical application of this trait is Kruskal's MST algorithm.
The most typical concrete implementation of this trait is the ConnectivityLazy class (usually known as Union-Find).
The type parameter This is the F-bounded self-type, ensuring that put and connect return the concrete subtype rather than DisjointSet[V].