numl.Math.LinearAlgebra.Matrix.Equals C# (CSharp) Метод

Equals() публичный Метод

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( Matrix m, double tol ) : bool
m Matrix initial matrix.
tol double Double to be compared.
Результат bool
        public bool Equals(Matrix m, double tol)
        {
            if (Rows != m.Rows || Cols != m.Cols)
                return false;

            for (int i = 0; i < Rows; i++)
                for (int j = 0; j < Cols; j++)
                    if (System.Math.Abs(this[i, j] - m[i, j]) > tol)
                        return false;
            return true;
        }

Same methods

Matrix::Equals ( object obj ) : bool