예제 #1
0
        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));
        }
예제 #2
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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 static public bool MoveIndex(this IArrayDefinition array, ref int i)
 {
     i++;
     return(i < array.GetOutOfBound(0));
 }