Class PartitioningAlgorithm.PartitioningImpl<V>

java.lang.Object
org.jgrapht.alg.interfaces.PartitioningAlgorithm.PartitioningImpl<V>
Type Parameters:
V - the vertex type
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<java.util.Set<V>>, PartitioningAlgorithm.Partitioning<V>
Enclosing interface:
PartitioningAlgorithm<V>

public static class PartitioningAlgorithm.PartitioningImpl<V>
extends java.lang.Object
implements PartitioningAlgorithm.Partitioning<V>, java.io.Serializable
Default implementation of a vertex partition
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    PartitioningImpl​(java.util.List<java.util.Set<V>> classes)
    Construct a new vertex partitioning.
    PartitioningImpl​(java.util.Map<V,​java.lang.Integer> vertexToPartitionMap)
    Construct a new vertex partitioning.
  • 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).
    java.util.Iterator<java.util.Set<V>> iterator()
    java.lang.String toString()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.jgrapht.alg.interfaces.PartitioningAlgorithm.Partitioning

    getPartitions
  • Constructor Details

    • PartitioningImpl

      public PartitioningImpl​(java.util.List<java.util.Set<V>> classes)
      Construct a new vertex partitioning.
      Parameters:
      classes - the partition classes
      Throws:
      java.lang.NullPointerException - if classes is null
    • PartitioningImpl

      public PartitioningImpl​(java.util.Map<V,​java.lang.Integer> vertexToPartitionMap)
      Construct a new vertex partitioning.
      Parameters:
      vertexToPartitionMap - the vertex to partition index map
      Throws:
      java.lang.NullPointerException - if vertexToPartitionMap is null
  • Method Details