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

this() public method

Allows index access to the elements of the matrix. Warning: This can be a somewhat slow way to access the matrix. Do not put this in performance critical loops. Make sure to use the Data property and access the matrix array directly.
public this ( int row, int col ) : double
row int The row to access.
col int The column to access.
return double
        public double this[int row, int col]
        {
            get
            {
                Validate(row, col);
                return matrix[row][col];
            }
            set
            {
                Validate(row, col);
                if (double.IsInfinity(value) || double.IsNaN(value))
                {
                    throw new MatrixError("Trying to assign invalud number to matrix: "
                                          + value);
                }
                matrix[row][col] = value;
            }
        }