Package org.jgrapht.alg.interfaces
Interface PartitioningAlgorithm.Partitioning<V>
-
- Type Parameters:
V
- the vertex type
- All Known Implementing Classes:
PartitioningAlgorithm.PartitioningImpl
- Enclosing interface:
- PartitioningAlgorithm<V>
public static interface PartitioningAlgorithm.Partitioning<V> extends Iterable<Set<V>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
getNumberPartitions()
Get the number of partitions.Set<V>
getPartition(int index)
Get the index-th partition (0-based).default List<Set<V>>
getPartitions()
Get the partitions.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getNumberPartitions
int getNumberPartitions()
Get the number of partitions.- Returns:
- the number of partitions
-
getPartition
Set<V> getPartition(int index)
Get the index-th partition (0-based).- Parameters:
index
- index of the partition to return- Returns:
- the index-th partition
- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getNumberPartitions()
)
-
-