本文整理汇总了C#中Altaxo.Calc.LinearAlgebra.DoubleSymmetricLevinson类的典型用法代码示例。如果您正苦于以下问题:C# DoubleSymmetricLevinson类的具体用法?C# DoubleSymmetricLevinson怎么用?C# DoubleSymmetricLevinson使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DoubleSymmetricLevinson类属于Altaxo.Calc.LinearAlgebra命名空间,在下文中一共展示了DoubleSymmetricLevinson类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetVectorMemberTest
public void GetVectorMemberTest()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T5);
DoubleVector TT = dsl.GetVector();
Assert.IsTrue(T5.Equals(TT));
}
示例2: ZeroLengthVectorTestsforConstructor1
public void ZeroLengthVectorTestsforConstructor1()
{
DoubleVector dv = new DoubleVector(1, 0.0);
dv.RemoveAt(0);
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(dv);
}
示例3: ZeroLengthVectorTestsforConstructor2
public void ZeroLengthVectorTestsforConstructor2()
{
double[] dv = new double[0];
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(dv);
}
示例4: NullParameterTestforConstructor1
public void NullParameterTestforConstructor1()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(null as DoubleVector);
}
示例5: NullParameterTestforConstructor2
public void NullParameterTestforConstructor2()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(null as double[]);
}
示例6: DecompositionTest10
public void DecompositionTest10()
{
int i, j;
double e, me;
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleMatrix U = dsl.U;
DoubleMatrix D = dsl.D;
DoubleMatrix L = dsl.L;
// check U is the transpose of L
Assert.IsTrue(U.Equals(L.GetTranspose()));
// check the lower triangle
me = 0.0;
for (i = 0; i < dsl.Order; i++)
{
for (j = 0; j <= i ; j++)
{
e = System.Math.Abs((A10[i, j] - L[i, j]) / A10[i, j]);
if (e > me)
{
me = e;
}
}
}
Assert.IsTrue(me < Tolerance10, "Maximum Error = " + me.ToString());
// check the diagonal
me = 0.0;
for (i = 0; i < dsl.Order; i++)
{
e = System.Math.Abs((D10[i] - D[i, i]) / D10[i]);
if (e > me)
{
me = e;
}
}
Assert.IsTrue(me < Tolerance10, "Maximum Error = " + me.ToString());
}
示例7: SingularityPropertyTest10
public void SingularityPropertyTest10()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
Assert.IsFalse(dsl.IsSingular);
}
示例8: NullParameterTestforSolveMatrix
public void NullParameterTestforSolveMatrix()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleMatrix X = dsl.Solve(null as DoubleMatrix);
}
示例9: MismatchRowsTestforSolveMatrix
public void MismatchRowsTestforSolveMatrix()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleMatrix X = dsl.Solve(I5);
}
示例10: MismatchRowsTestforSolveVector
public void MismatchRowsTestforSolveVector()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleVector X = dsl.Solve(X5);
}
示例11: SolveVector10
public void SolveVector10()
{
int i;
double e, me;
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleVector X = dsl.Solve(Y10);
// determine the maximum error
me = 0.0;
for (i = 0; i < dsl.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());
}
示例12: NullParameterTestforSolveVector
public void NullParameterTestforSolveVector()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
DoubleVector X = dsl.Solve(null as DoubleVector);
}
示例13: GetDeterminantMethodTest10
public void GetDeterminantMethodTest10()
{
// calculate determinant from diagonal
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T10);
// check results match
Double e = System.Math.Abs( (dsl.GetDeterminant() - Det10)/Det10 );
Assert.IsTrue(e < Tolerance10);
}
示例14: SingularityPropertyTest
public void SingularityPropertyTest()
{
DoubleVector T = new DoubleVector(10);
for (int i = 1; i < 10; i++)
{
T[i] = (double) (i + 1);
}
T[0] = -2.0;
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T);
Assert.IsTrue(dsl.IsSingular);
}
示例15: GetMatrixMemberTest
public void GetMatrixMemberTest()
{
DoubleSymmetricLevinson dsl = new DoubleSymmetricLevinson(T5);
DoubleMatrix dsldm = dsl.GetMatrix();
for (int row = 0; row < T5.Length; row++)
{
for (int column = 0; column < T5.Length; column++)
{
if (column < row)
{
Assert.IsTrue(dsldm[row, column] == T5[row - column]);
}
else
{
Assert.IsTrue(dsldm[row, column] == T5[column - row]);
}
}
}
}