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 ( object obj ) : bool
obj object The object to compare with the current object.
Результат bool
        public override bool Equals(object obj)
        {
            if (obj is Matrix)
            {
                var m = obj as Matrix;
                if (Rows != m.Rows || Cols != m.Cols)
                    return false;

                for (int i = 0; i < Rows; i++)
                    for (int j = 0; j < Cols; j++)
                        if (this[i, j] != m[i, j])
                            return false;

                return true;
            }
            else
                return false;
        }

Same methods

Matrix::Equals ( Matrix m, double tol ) : bool