コード例 #1
0
 static ComplexFloatCholeskyDecompTest() 
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(3);
   a[0,0] = 2;
   a[0,1] = new ComplexFloat(1,-1);
   a[0,2] = 0;
   a[1,0] = new ComplexFloat(1,-1);
   a[1,1] = 2;
   a[1,2] = 0;
   a[2,0] = 0;
   a[2,1] = 0;
   a[2,2] = 3;
   cd = new ComplexFloatCholeskyDecomp(a);
 }
コード例 #2
0
 public void NonSymmFactorTest()
 {
   ComplexFloatMatrix b = new ComplexFloatMatrix(3);
   b[0,0] = 2;
   b[0,1] = 1;
   b[0,2] = 1;
   b[1,0] = 1;
   b[1,1] = 2;
   b[1,2] = 0;
   b[2,0] = 0;
   b[2,1] = 0;
   b[2,2] = 3;
   ComplexFloatCholeskyDecomp dcd = new ComplexFloatCholeskyDecomp(b);
   Assert.AreEqual(dcd.Factor[0,0].Real,1.414,TOLERENCE);
   Assert.AreEqual(dcd.Factor[0,1].Real,0.000,TOLERENCE);
   Assert.AreEqual(dcd.Factor[0,2].Real,0.000,TOLERENCE);
   Assert.AreEqual(dcd.Factor[1,0].Real,0.707,TOLERENCE);
   Assert.AreEqual(dcd.Factor[1,1].Real,1.225,TOLERENCE);
   Assert.AreEqual(dcd.Factor[1,2].Real,0.000,TOLERENCE);
   Assert.AreEqual(dcd.Factor[2,0].Real,0.000,TOLERENCE);
   Assert.AreEqual(dcd.Factor[2,1].Real,0.000,TOLERENCE);
   Assert.AreEqual(dcd.Factor[2,2].Real,1.732,TOLERENCE);
 }
コード例 #3
0
 public void CDLong()
 {
   ComplexFloatMatrix lm = new ComplexFloatMatrix(3,2);
   ComplexFloatCholeskyDecomp lcd = new ComplexFloatCholeskyDecomp(lm);
 }
コード例 #4
0
    public void CDWide()
    {
      ComplexFloatMatrix wm = new ComplexFloatMatrix(2,3);
      ComplexFloatCholeskyDecomp wcd = new ComplexFloatCholeskyDecomp(wm);

    }
コード例 #5
0
 public void GetInverseNotPositiveDefiniteTest()
 {
   ComplexFloatMatrix a = new ComplexFloatMatrix(3,3);
   ComplexFloatCholeskyDecomp dcd = new ComplexFloatCholeskyDecomp(a);
   dcd.GetInverse();
 }
コード例 #6
0
 public void IsPositiveDefiniteTest()
 {
   Assert.IsTrue(cd.IsPositiveDefinite);
   ComplexFloatMatrix b = new ComplexFloatMatrix(3);
   b[0,0] = -2;
   b[0,1] = 1;
   b[0,2] = 0;
   b[1,0] = 1;
   b[1,1] = 2;
   b[1,2] = 0;
   b[2,0] = 0;
   b[2,1] = 0;
   b[2,2] = 3;
   ComplexFloatCholeskyDecomp dcd = new ComplexFloatCholeskyDecomp(b);
   Assert.IsFalse(dcd.IsPositiveDefinite);
 }