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

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

PPᵀ = I = PᵀP Permutation matrix of the LU decomposition times the transpose of the permutation matrix is the identity matrix.
    public function testLUDecompositionPPTransposeEqualsIdentity(array $A)
    {
        $A = MatrixFactory::create($A);
        $LUP = $A->LUDecomposition();
        $P = $LUP['P'];
        $Pᵀ = $P->transpose();
        $PPᵀ = $P->multiply($Pᵀ);
        $PᵀP = $Pᵀ->multiply($P);
        $I = MatrixFactory::identity($A->getM());
        $this->assertEquals($PPᵀ->getMatrix(), $I->getMatrix());
        $this->assertEquals($I->getMatrix(), $PᵀP->getMatrix());
        $this->assertEquals($PPᵀ->getMatrix(), $PᵀP->getMatrix());
    }
MatrixAxiomsTest