本文整理汇总了C#中Altaxo.Calc.LinearAlgebra.FloatSymmetricLevinson类的典型用法代码示例。如果您正苦于以下问题:C# FloatSymmetricLevinson类的具体用法?C# FloatSymmetricLevinson怎么用?C# FloatSymmetricLevinson使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FloatSymmetricLevinson类属于Altaxo.Calc.LinearAlgebra命名空间,在下文中一共展示了FloatSymmetricLevinson类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetVectorMemberTest
public void GetVectorMemberTest()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T5);
FloatVector TT = fsl.GetVector();
Assert.IsTrue(T5.Equals(TT));
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:FloatSymmetricLevinsonTest.cs
示例2: ZeroLengthVectorTestsforConstructor1
public void ZeroLengthVectorTestsforConstructor1()
{
FloatVector dv = new FloatVector(1, 0.0f);
dv.RemoveAt(0);
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(dv);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:6,代码来源:FloatSymmetricLevinsonTest.cs
示例3: ZeroLengthVectorTestsforConstructor2
public void ZeroLengthVectorTestsforConstructor2()
{
float[] dv = new float[0];
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(dv);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例4: NullParameterTestforConstructor1
public void NullParameterTestforConstructor1()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(null as FloatVector);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:4,代码来源:FloatSymmetricLevinsonTest.cs
示例5: NullParameterTestforConstructor2
public void NullParameterTestforConstructor2()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(null as float[]);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:4,代码来源:FloatSymmetricLevinsonTest.cs
示例6: DecompositionTest10
public void DecompositionTest10()
{
int i, j;
float e, me;
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatMatrix U = fsl.U;
FloatMatrix D = fsl.D;
FloatMatrix L = fsl.L;
// check U is the transpose of L
Assert.IsTrue(U.Equals(L.GetTranspose()));
// check the lower triangle
me = 0.0f;
for (i = 0; i < fsl.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.0f;
for (i = 0; i < fsl.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());
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:39,代码来源:FloatSymmetricLevinsonTest.cs
示例7: SingularityPropertyTest10
public void SingularityPropertyTest10()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
Assert.IsFalse(fsl.IsSingular);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例8: NullParameterTestforSolveMatrix
public void NullParameterTestforSolveMatrix()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatMatrix X = fsl.Solve(null as FloatMatrix);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例9: MismatchRowsTestforSolveMatrix
public void MismatchRowsTestforSolveMatrix()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatMatrix X = fsl.Solve(I5);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例10: MismatchRowsTestforSolveVector
public void MismatchRowsTestforSolveVector()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatVector X = fsl.Solve(X5);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例11: SolveVector10
public void SolveVector10()
{
int i;
float e, me;
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatVector X = fsl.Solve(Y10);
// determine the maximum error
me = 0.0f;
for (i = 0; i < fsl.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());
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:19,代码来源:FloatSymmetricLevinsonTest.cs
示例12: NullParameterTestforSolveVector
public void NullParameterTestforSolveVector()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
FloatVector X = fsl.Solve(null as FloatVector);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例13: GetDeterminantMethodTest10
public void GetDeterminantMethodTest10()
{
// calculate determinant from diagonal
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
// check results match
float e = System.Math.Abs( (fsl.GetDeterminant() - Det10)/Det10 );
Assert.IsTrue(e < Tolerance10);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:9,代码来源:FloatSymmetricLevinsonTest.cs
示例14: SingularityPropertyTest
public void SingularityPropertyTest()
{
FloatVector T = new FloatVector(10);
for (int i = 1; i < 10; i++)
{
T[i] = (float) (i + 1);
}
T[0] = -2.0f;
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T);
Assert.IsTrue(fsl.IsSingular);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:12,代码来源:FloatSymmetricLevinsonTest.cs
示例15: GetMatrixMemberTest
public void GetMatrixMemberTest()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T5);
FloatMatrix fsldm = fsl.GetMatrix();
for (int row = 0; row < T5.Length; row++)
{
for (int column = 0; column < T5.Length; column++)
{
if (column < row)
{
Assert.IsTrue(fsldm[row, column] == T5[row - column]);
}
else
{
Assert.IsTrue(fsldm[row, column] == T5[column - row]);
}
}
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:19,代码来源:FloatSymmetricLevinsonTest.cs
示例16: SolveMatrix5
public void SolveMatrix5()
{
int i, j;
float e, me;
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T5);
// check inverse
FloatMatrix I = fsl.Solve(FloatMatrix.CreateIdentity(5));
me = 0.0f;
for (i = 0; i < fsl.Order; i++)
{
for (j = 0; j < fsl.Order; j++)
{
e = System.Math.Abs((I5[i, j] - I[i, j]) / I5[i, j]);
if (e > me)
{
me = e;
}
}
}
Assert.IsTrue(me < Tolerance5, "Maximum Error = " + me.ToString());
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:22,代码来源:FloatSymmetricLevinsonTest.cs
示例17: OrderPropertyTest
public void OrderPropertyTest()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T5);
Assert.IsTrue(fsl.Order == 5);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例18: GetInverse10
public void GetInverse10()
{
int i, j;
float e, me;
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T10);
// check inverse
FloatMatrix I = fsl.GetInverse();
me = 0.0f;
for (i = 0; i < fsl.Order; i++)
{
for (j = 0; j < fsl.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());
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:22,代码来源:FloatSymmetricLevinsonTest.cs
示例19: PositveDefinitePropertyTest5
public void PositveDefinitePropertyTest5()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(T5);
Assert.IsTrue(fsl.IsPositiveDefinite);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
示例20: PositveDefinitePropertyTest
public void PositveDefinitePropertyTest()
{
FloatSymmetricLevinson fsl = new FloatSymmetricLevinson(1.0f, 2.0f, 3.0f, 4.0f, 5.0f);
Assert.IsFalse(fsl.IsPositiveDefinite);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:FloatSymmetricLevinsonTest.cs
注:本文中的Altaxo.Calc.LinearAlgebra.FloatSymmetricLevinson类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论