Encog.MathUtil.Matrices.Matrix.Validate C# (CSharp) Method

Validate() private method

Validate that the specified row and column are inside of the range of the matrix.
private Validate ( int row, int col ) : void
row int The row to check.
col int The column to check.
return void
        private void Validate(int row, int col)
        {
            if ((row >= Rows) || (row < 0))
            {
                throw new MatrixError("The row:" + row + " is out of range:"
                                      + Rows);
            }

            if ((col >= Cols) || (col < 0))
            {
                throw new MatrixError("The col:" + col + " is out of range:"
                                      + Cols);
            }
        }