MathPHP\LinearAlgebra\MatrixAxiomsTest::testLUDecompositionPAEqualsLU PHP Метод

testLUDecompositionPAEqualsLU() публичный Метод

PA = LU Basic LU decomposition property that permutation matrix times the matrix is the product of the lower and upper decomposition matrices.
    public function testLUDecompositionPAEqualsLU(array $A)
    {
        $A = MatrixFactory::create($A);
        $LUP = $A->LUDecomposition();
        $L = $LUP['L'];
        $U = $LUP['U'];
        $P = $LUP['P'];
        $PA = $P->multiply($A);
        $LU = $L->multiply($U);
        $UL = $U->multiply($L);
        $this->assertEquals($PA->getMatrix(), $LU->getMatrix());
    }
MatrixAxiomsTest