V - the type of the values storedpublic class Partition<V> extends Object
| Modifier and Type | Method and Description |
|---|---|
V |
componentOf(V i)
Find the representative for the given item
|
Set<V> |
getNodes() |
V |
merge(V a,
V b)
Merges the given components and returns the representative of the new component
|
boolean |
sameComponent(V a,
V b)
Determines whether the two items are in the same component or not
|
static <T> Partition<T> |
singletons(Collection<T> nodes)
Constructs a new partition of singletons
|
public static <T> Partition<T> singletons(Collection<T> nodes)
public V merge(V a, V b)
public boolean sameComponent(V a, V b)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.