/** * Iterate over a cross product of the * coordinates * @param indexes the coordinates to iterate over. * Each element of the array should be of type {@link SpecifiedIndex} * otherwise it will end up throwing an exception * @return the generator for iterating over all the combinations of the specified indexes. */ public static Generator<List<List<Long>>> iterate(INDArrayIndex... indexes) { Generator<List<List<Long>>> gen = Itertools.product(new SpecifiedIndexesGenerator(indexes)); return gen; }
/** * Iterate over a cross product of the * coordinates * @param indexes the coordinates to iterate over. * Each element of the array should be of opType {@link SpecifiedIndex} * otherwise it will end up throwing an exception * @return the generator for iterating over all the combinations of the specified indexes. */ public static Generator<List<List<Long>>> iterate(INDArrayIndex... indexes) { Generator<List<List<Long>>> gen = Itertools.product(new SpecifiedIndexesGenerator(indexes)); return gen; }