Interface PartitioningAlgorithm.Partitioning<V>

Type Parameters:
V - the vertex type
All Superinterfaces:
java.lang.Iterable<java.util.Set<V>>
All Known Implementing Classes:
PartitioningAlgorithm.PartitioningImpl
Enclosing interface:
PartitioningAlgorithm<V>

public static interface PartitioningAlgorithm.Partitioning<V>
extends java.lang.Iterable<java.util.Set<V>>
  • Method Summary

    Modifier and Type Method Description
    int getNumberPartitions()
    Get the number of partitions.
    java.util.Set<V> getPartition​(int index)
    Get the index-th partition (0-based).
    default java.util.List<java.util.Set<V>> getPartitions()
    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

      java.util.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:
      java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getNumberPartitions())
    • getPartitions

      default java.util.List<java.util.Set<V>> getPartitions()
      Get the partitions. This method returns a partitioning of the vertices in the graph into disjoint partitions.
      Returns:
      a list of partitions