Class SubsetIterator

java.lang.Object
org.graph4j.util.SubsetIterator
All Implemented Interfaces:
Iterator<int[]>

public class SubsetIterator extends Object implements Iterator<int[]>
Iterates over all subsets of the set {0,1,...,n-1}.
Author:
Cristian Frăsinaru
  • Constructor Details

    • SubsetIterator

      public SubsetIterator(int n)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<int[]>
    • next

      public int[] next()
      Specified by:
      next in interface Iterator<int[]>