protected function doTransform(Matrix $mA, $extra = null)
    {
        if ($mA->is('empty')) {
            return new Matrix([]);
        }
        /** @noinspection PhpInternalEntityUsedInspection */
        $this->assertParameterIsArray($extra, 'Second operand is not an array');

        if (count($extra) != 2) {
            throw new MatrixException('Second operand does not contain row and column');
        }
        $row = intval($extra[0]);
        $col = intval($extra[1]);
        $size = $mA->rows();
        if ($row<1 || $row > $size) {
            throw new MatrixException('Row indicator out of bounds');
        }
        if ($col<1 || $col > $size) {
            throw new MatrixException('Col indicator out of bounds');
        }

        $fC = new Colreduce();
        $fR = new Rowreduce();
        //R(C(mA))
        return $fR($fC($mA,[$col]),[$row]);
    }
protected function doTransform(Matrix $mA, $extra = null)
    {
        if ($mA->is('empty')) {
            return new Matrix([]);
        }
        /** @noinspection PhpInternalEntityUsedInspection */
        $this->assertParameterIsArray($extra, 'Second operand is not an array');

        if (count($extra) != 2) {
            throw new MatrixException('Second operand does not contain row and column');
        }
        $row = intval($extra[0]);
        $col = intval($extra[1]);
        $size = $mA->rows();
        if ($row<1 || $row > $size) {
            throw new MatrixException('Row indicator out of bounds');
        }
        if ($col<1 || $col > $size) {
            throw new MatrixException('Col indicator out of bounds');
        }

        $fC = new Colreduce();
        $fR = new Rowreduce();
        //R(C(mA))
        return $fR($fC($mA,[$col]),[$row]);
    }
protected function doTransform ( Matrix $ mA , $ extra = null ) { if ( $ mA -> is ( 'empty' ) ) { return new Matrix ( [ ] ) ; } /** @noinspection PhpInternalEntityUsedInspection */ $ this -> assertParameterIsArray ( $ extra , 'Second operand is not an array' ) ; if ( count ( $ extra ) != 2 ) { throw new MatrixException ( 'Second operand does not contain row and column' ) ; } $ row = intval ( $ extra [ 0 ] ) ; $ col = intval ( $ extra [ 1 ] ) ; $ size = $ mA -> rows ( ) ; if ( $ row < 1 || $ row > $ size ) { throw new MatrixException ( 'Row indicator out of bounds' ) ; } if ( $ col < 1 || $ col > $ size ) { throw new MatrixException ( 'Col indicator out of bounds' ) ; } $ fC = new Colreduce ( ) ; $ fR = new Rowreduce ( ) ; //R(C(mA)) return $ fR ( $ fC ( $ mA , [ $ col ] ) , [ $ row ] ) ; }
Return cofactor matrix for a given vertice

@param Matrix $mA First matrix operand - required
@param array $extra [int row, int col]

@return Matrix

@throws MatrixException
Return cofactor matrix for a given vertice