Class PartitioningAlgorithm.PartitioningImpl<V>

    • 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.
    • Constructor Detail

      • 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 Detail

      • getPartition

        public java.util.Set<V> getPartition​(int index)
        Get the index-th partition (0-based).
        Specified by:
        getPartition in interface PartitioningAlgorithm.Partitioning<V>
        Parameters:
        index - index of the partition to return
        Returns:
        the index-th partition
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • iterator

        public java.util.Iterator<java.util.Set<V>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<V>