示例#1
0
		public void InvertSingular()
		{
			ComplexDoubleMatrix a = new ComplexDoubleMatrix(2, 2);
			a.Invert();
		}
示例#2
0
		public void InvertNotSquare()
		{
			ComplexDoubleMatrix a = new ComplexDoubleMatrix(3, 2);
			a[0, 0] = new Complex(2);
			a[0, 1] = new Complex(4);
			a[1, 0] = new Complex(3);
			a[1, 1] = new Complex(7);
			a[2, 0] = new Complex(5);
			a[2, 1] = new Complex(5);
			a.Invert();
		}
示例#3
0
		public void Invert()
		{
			ComplexDoubleMatrix a = new ComplexDoubleMatrix(2, 2);
			a[0, 0] = new Complex(2);
			a[0, 1] = new Complex(4);
			a[1, 0] = new Complex(3);
			a[1, 1] = new Complex(7);
			a.Invert();
			Assert.AreEqual(a[0, 0].Real, 3.5, 3.5E-15);
			Assert.AreEqual(a[0, 1].Real, -2, 2E-15);
			Assert.AreEqual(a[1, 0].Real, -1.5, 1.5E-15);
			Assert.AreEqual(a[1, 1].Real, 1, 1E-15);
		}