static public bool MoveIndex(this IArrayDefinition array, ref int i, ref int j) { j++; if (j < array.GetOutOfBound(1)) { return(true); } j = 0; i++; return(i < array.GetOutOfBound(0)); }
static public bool MoveIndex(this IArrayDefinition array, ref int x, int dimension) { x++; if (x < array.GetOutOfBound(dimension)) { return(true); } x = array.GetLowerBound(dimension); return(false); }
static public bool MoveIndex(this IArrayDefinition array, int[] indexes) { indexes[array.Rank - 1]++; for (int r = array.Rank - 1; r >= 0; r--) { if (indexes[r] < array.GetOutOfBound(r)) { break; } if (r - 1 < 0) { return(false); } indexes[r] = array.GetLowerBound(r); indexes[r - 1]++; } return(true); }
static public bool MoveIndex(this IArrayDefinition array, ref int i) { i++; return(i < array.GetOutOfBound(0)); }