public void MemberAddNull() { ComplexDoubleMatrix a = new ComplexDoubleMatrix(2); ComplexDoubleMatrix b = null; a.Add(b); }
public void MemberAddIncompatible() { ComplexDoubleMatrix a = new ComplexDoubleMatrix(2); ComplexDoubleMatrix b = new ComplexDoubleMatrix(3); a.Add(b); }
public void MemberAdd() { ComplexDoubleMatrix a = new ComplexDoubleMatrix(2); ComplexDoubleMatrix b = new ComplexDoubleMatrix(2); a[0, 0] = b[0, 0] = new Complex(1); a[0, 1] = b[0, 1] = new Complex(2); a[1, 0] = b[1, 0] = new Complex(3); a[1, 1] = b[1, 1] = new Complex(4); a.Add(b); Assert.AreEqual(a[0, 0], new Complex(2)); Assert.AreEqual(a[0, 1], new Complex(4)); Assert.AreEqual(a[1, 0], new Complex(6)); Assert.AreEqual(a[1, 1], new Complex(8)); }