Britbot
Britbot.ExpIterator.ExpIterator ( int[]  dims) [inline]

Assigns dimensions and initiate value of iteration.

Parameters:
dimsdimensions of the iteration
Exceptions:
ExceptionDimensions must be strictly positive

Definition at line 38 of file ExpIterator.cs.

        {
            //set the given dimensions

            this.Dimensions = dims;

            //check if dimensions are legal (meaning strictly positive)
            if (Dimensions.Any(dim => dim <= 0))
            {
                throw new InvalidIteratorDimensionException("Dimensions must be strictly positive");
            }

            //initiate count at zero
            this.Values = new int[dims.Length];
            for (int i = 0; i < this.Values.Length; i++)
            {
                Values[i] = 0;
            }
        }