コード例 #1
0
        public void GetInverseNotPositiveDefiniteTest()
        {
            FloatMatrix         a   = new FloatMatrix(3, 3);
            FloatCholeskyDecomp dcd = new FloatCholeskyDecomp(a);

            dcd.GetInverse();
        }
コード例 #2
0
        public void GetInverseTest()
        {
            FloatMatrix inv = cd.GetInverse();

            Assert.AreEqual(inv[0, 0], 0.666667, TOLERENCE);
            Assert.AreEqual(inv[0, 1], -0.333333, TOLERENCE);
            Assert.AreEqual(inv[0, 2], 0);
            Assert.AreEqual(inv[1, 0], -0.333333, TOLERENCE);
            Assert.AreEqual(inv[1, 1], 0.666667, TOLERENCE);
            Assert.AreEqual(inv[1, 2], 0);
            Assert.AreEqual(inv[2, 0], 0);
            Assert.AreEqual(inv[2, 1], 0);
            Assert.AreEqual(inv[2, 2], 0.333333, TOLERENCE);
        }