Пример #1
0
		public void GetInverseNotSquare()
		{
			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);
			ComplexDoubleMatrix b = a.GetInverse();
		}
Пример #2
0
		public void GetInverse()
		{
			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);
			ComplexDoubleMatrix b = a.GetInverse();
			Assert.AreEqual(b[0, 0].Real, 3.5, 3.5E-15);
			Assert.AreEqual(b[0, 1].Real, -2, 2E-15);
			Assert.AreEqual(b[1, 0].Real, -1.5, 1.5E-15);
			Assert.AreEqual(b[1, 1].Real, 1, 1E-15);
		}
Пример #3
0
		public void GetInverseSingular()
		{
			ComplexDoubleMatrix a = new ComplexDoubleMatrix(2, 2);
			ComplexDoubleMatrix b = a.GetInverse();
		}