public void Equals() { FloatMatrix a = new FloatMatrix(2, 2, 4); FloatMatrix b = new FloatMatrix(2, 2, 4); FloatMatrix c = new FloatMatrix(2, 2); c[0, 0] = 4; c[0, 1] = 4; c[1, 0] = 4; c[1, 1] = 4; FloatMatrix d = new FloatMatrix(2, 2, 5); FloatMatrix e = null; DoubleMatrix f = new DoubleMatrix(2, 2, 4); Assert.IsTrue(a.Equals(b)); Assert.IsTrue(b.Equals(a)); Assert.IsTrue(a.Equals(c)); Assert.IsTrue(b.Equals(c)); Assert.IsTrue(c.Equals(b)); Assert.IsTrue(c.Equals(a)); Assert.IsFalse(a.Equals(d)); Assert.IsFalse(d.Equals(b)); Assert.IsFalse(a.Equals(e)); Assert.IsFalse(a.Equals(f)); }