示例#1
0
		public void SolveMatrix10()
		{
			int i, j;
			double e, me;
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);

			// check inverse
			DoubleMatrix I = dl.Solve(DoubleMatrix.CreateIdentity(10));
			me = 0.0;
			for (i = 0; i < dl.Order; i++)
			{
				for (j = 0; j < dl.Order; j++)
				{
					e = System.Math.Abs((I10[i, j] - I[i, j]) / I10[i, j]);
					if (e > me)
					{
						me = e;
					}
				}
			}
			Assert.IsTrue(me < Tolerance10, "Maximum Error = " + me.ToString());
		}
示例#2
0
		public void MismatchRowsTestforSolveMatrix()
		{
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);
			DoubleMatrix X = dl.Solve(I5);
		}
示例#3
0
		public void NullParameterTestforSolveMatrix()
		{
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);
			DoubleMatrix X = dl.Solve(null as DoubleMatrix);
		}
示例#4
0
		public void SolveVector10()
		{
			int i;
			double e, me;
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);
			DoubleVector X = dl.Solve(Y10);

			// determine the maximum error
			me = 0.0;
			for (i = 0; i < dl.Order; i++)
			{
				e = System.Math.Abs((X10[i] - X[i]) / X10[i]);
				if (e > me)
				{
					me = e;
				}
			}
			Assert.IsTrue(me < Tolerance10, "Maximum Error = " + me.ToString());
		}
示例#5
0
		public void MismatchRowsTestforSolveVector()
		{
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);
			DoubleVector X = dl.Solve(X5);
		}
示例#6
0
		public void NullParameterTestforSolveVector()
		{
			DoubleLevinson dl = new DoubleLevinson(LC10, TR10);
			DoubleVector X = dl.Solve(null as DoubleVector);
		}