Package org.hipparchus.util
Class MultidimensionalCounter.Iterator
- java.lang.Object
-
- org.hipparchus.util.MultidimensionalCounter.Iterator
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount()Get the current unidimensional counter slot.intgetCount(int dim)Get the current count in the selected dimension.int[]getCounts()Get the current multidimensional counter slots.booleanhasNext()Integernext()voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
next
public Integer next()
- Specified by:
nextin interfaceIterator<Integer>- Returns:
- the unidimensional count after the counter has been
incremented by
1. - Throws:
NoSuchElementException- ifhasNext()would have returnedfalse.
-
getCount
public int getCount()
Get the current unidimensional counter slot.- Returns:
- the index within the unidimensionl counter.
-
getCounts
public int[] getCounts()
Get the current multidimensional counter slots.- Returns:
- the indices within the multidimensional counter.
-
getCount
public int getCount(int dim)
Get the current count in the selected dimension.- Parameters:
dim- Dimension index.- Returns:
- the count at the corresponding index for the current state of the iterator.
- Throws:
IndexOutOfBoundsException- ifindexis not in the correct interval (as defined by the length of the argument in theconstructor of the enclosing class).
-
-