public void SolveMatrix1() { int i, j; double e, me; ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T1); // check inverse ComplexDoubleMatrix I = cdsl.Solve(ComplexDoubleMatrix.CreateIdentity(1)); me = 0.0; for (i = 0; i < cdsl.Order; i++) { for (j = 0; j < cdsl.Order; j++) { e = ComplexMath.Absolute((I1[i, j] - I[i, j]) / I1[i, j]); if (e > me) { me = e; } } } Assert.IsTrue(me < Tolerance1, "Maximum Error = " + me.ToString()); }
public void MismatchRowsTestforSolveMatrix() { ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T4); ComplexDoubleMatrix X = cdsl.Solve(I5); }
public void NullParameterTestforSolveMatrix() { ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T5); ComplexDoubleMatrix X = cdsl.Solve(null as ComplexDoubleMatrix); }
public void SolveVector5() { int i; double e, me; ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T5); ComplexDoubleVector X = cdsl.Solve(Y5); // determine the maximum error me = 0.0; for (i = 0; i < cdsl.Order; i++) { e = ComplexMath.Absolute((X5[i] - X[i]) / X5[i]); if (e > me) { me = e; } } Assert.IsTrue(me < Tolerance5, "Maximum Error = " + me.ToString()); }
public void MismatchRowsTestforSolveVector() { ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T4); ComplexDoubleVector X = cdsl.Solve(X5); }
public void NullParameterTestforSolveVector() { ComplexDoubleSymmetricLevinson cdsl = new ComplexDoubleSymmetricLevinson(T5); ComplexDoubleVector X = cdsl.Solve(null as ComplexDoubleVector); }