com.tonbeller.jpivot.util
Class CubeIndexIterator

java.lang.Object
  extended by com.tonbeller.jpivot.util.CubeIndexIterator

public class CubeIndexIterator
extends java.lang.Object

generate array of indexes for an n-dimensional qube basically "n" nested loops for (i1 =0; i1 < n1 ; i1++ ) for (i2 =0; i2 < n2 ; i2++ ) ... for (im =0; im < nm ; im++ )


Constructor Summary
CubeIndexIterator(int[] ni, boolean firstFast)
          c'tor
 
Method Summary
 int[] next()
           
 void reset()
          reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CubeIndexIterator

public CubeIndexIterator(int[] ni,
                         boolean firstFast)
c'tor

Parameters:
ni - - array of max indexes for dimensions
firstFast - , first index runs fastest if true
Method Detail

next

public int[] next()
Returns:
next index array, null if done

reset

public void reset()
reset