/// <summary>Indicates whether or not two matricies contain same values /// in an element-wise comparison. Does not verify that the matricies point /// to the same underlying data-set or element instances</summary> /// <param name="matrix1">Matrix to compare</param> /// <param name="matrix2">Matrix to compare</param> /// <returns>true, if the matricies are equal on an element-wise basis; otherwise, false</returns> public static Boolean Equality(DoubleMatrix matrix1, DoubleMatrix matrix2) { if ((object)matrix1 == null || (object)matrix2 == null) { return(false); } return(MatrixBase <Double> .Equality(matrix1.InnerMatrix, matrix2.InnerMatrix)); }
/// <summary>Determines whether two MatrixBase instances are equal</summary> /// <param name="obj">The MatrixBase object to compare with the current MatrixBase object</param> /// <returns>true if the specified MatrixBase object is equal to the curent MatrixBase object; otherwise, false</returns> public override Boolean Equals(Object obj) { return(MatrixBase <T> .Equality(this, obj as MatrixBase <T>)); }
/// <summary>!=</summary> /// <param name="matrix1">Left-hand matrix</param> /// <param name="matrix2">Right-hand matrix</param> /// <returns></returns> public static Boolean operator !=(MatrixBase <T> matrix1, MatrixBase <T> matrix2) { return(!MatrixBase <T> .Equality(matrix1, matrix2)); }