MathPHP\LinearAlgebra\RowVectorTest::testTranspose PHP Метод

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

public testTranspose ( array $M )
$M array
    public function testTranspose(array $M)
    {
        $R = new RowVector($M);
        $Rᵀ = $R->transpose();
        $this->assertInstanceOf('MathPHP\\LinearAlgebra\\ColumnVector', $Rᵀ);
        $this->assertInstanceOf('MathPHP\\LinearAlgebra\\Matrix', $Rᵀ);
        $this->assertEquals(count($M), $Rᵀ->getM());
        $this->assertEquals(1, $Rᵀ->getN());
        foreach ($M as $row => $value) {
            $this->assertEquals($value, $Rᵀ[$row][0]);
        }
    }