Module org.jgrapht.core
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>
-
Method Summary
Modifier and TypeMethodDescriptionintGet the number of partitions.getPartition(int index) Get the index-th partition (0-based).Get the partitions.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getNumberPartitions
int getNumberPartitions()Get the number of partitions.- Returns:
- the number of partitions
-
getPartition
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())
-
getPartitions
Get the partitions. This method returns a partitioning of the vertices in the graph into disjoint partitions.- Returns:
- a list of partitions
-