public void Test03()
        {
            Matrix X = new Matrix(3, 3).Zero();
            LUDecomposition lud = new LUDecomposition(X);

            Assert.AreEqual(0, lud.ZeroValueIndexOfU);   // �����Ȃ� 0 �v�f
        }
        public void Test04()
        {
            Matrix X = new Matrix(new double[,] { { 1, 2, 3 }, { 2, 2, 2 }, { 0, 0, 0 } });
            LUDecomposition lud = new LUDecomposition(X);

            Assert.AreEqual(2, lud.ZeroValueIndexOfU);   // X.Rows[2]���g���Ȃ�
        }
        public void Test05()
        {
            Matrix X = new Matrix(
                            new RowVector(1, 2, 5),
                            new RowVector(2, 5, 7));

            LUDecomposition lud = new LUDecomposition(X);

            Assert.IsTrue(IsLowerTriangular(lud.L));
            Assert.IsTrue(IsUpperTriangular(lud.U));

            Assert.AreEqual(X, lud.P * lud.L * lud.U);
        }
        public void Test01()
        {
            const double angle = Math.PI / 6;
            Matrix X = new Matrix(new RowVector(Math.Cos(angle), -Math.Sin(angle), 0),
                                    new RowVector(Math.Sin(angle), Math.Cos(angle), 0),
                                    new RowVector(0, 0, 1));

            LUDecomposition lud = new LUDecomposition(X);

            Assert.IsTrue(IsLowerTriangular(lud.L));
            Assert.IsTrue(IsUpperTriangular(lud.U));

            Assert.AreEqual(X, lud.P * lud.L * lud.U);

            Assert.AreEqual(1.0, X.Determinant, LisysConfig.CalculationLowerLimit);
        }