V
- the vertex typepublic static class PartitioningAlgorithm.PartitioningImpl<V> extends Object implements PartitioningAlgorithm.Partitioning<V>, Serializable
Constructor and Description |
---|
PartitioningImpl(List<Set<V>> classes)
Construct a new vertex partitioning.
|
PartitioningImpl(Map<V,Integer> vertexToPartitionMap)
Construct a new vertex partitioning.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumberPartitions()
Get the number of partitions.
|
Set<V> |
getPartition(int index)
Get the index-th partition (0-based).
|
Iterator<Set<V>> |
iterator() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPartitions
forEach, spliterator
public PartitioningImpl(List<Set<V>> classes)
classes
- the partition classesNullPointerException
- if classes
is null
public PartitioningImpl(Map<V,Integer> vertexToPartitionMap)
vertexToPartitionMap
- the vertex to partition index mapNullPointerException
- if vertexToPartitionMap
is null
public int getNumberPartitions()
getNumberPartitions
in interface PartitioningAlgorithm.Partitioning<V>
public Set<V> getPartition(int index)
getPartition
in interface PartitioningAlgorithm.Partitioning<V>
index
- index of the partition to returnCopyright © 2019. All rights reserved.