protected static function getMinors(Matrix $matrix)
    {
        $minors = $matrix->toArray();
        $dimensions = $matrix->rows;
        if ($dimensions == 1) {
            return $minors;
        }

        for ($i = 0; $i < $dimensions; ++$i) {
            for ($j = 0; $j < $dimensions; ++$j) {
                $minors[$i][$j] = self::getDeterminantSegment($matrix, $i, $j);
            }
        }

        return $minors;
    }
protected static function getMinors(Matrix $matrix)
    {
        $minors = $matrix->toArray();
        $dimensions = $matrix->rows;
        if ($dimensions == 1) {
            return $minors;
        }

        for ($i = 0; $i < $dimensions; ++$i) {
            for ($j = 0; $j < $dimensions; ++$j) {
                $minors[$i][$j] = self::getDeterminantSegment($matrix, $i, $j);
            }
        }

        return $minors;
    }
protected static function getMinors ( Matrix $ matrix ) { $ minors = $ matrix -> toArray ( ) ; $ dimensions = $ matrix -> rows ; if ( $ dimensions == 1 ) { return $ minors ; } for ( $ i = 0 ; $ i < $ dimensions ; ++ $ i ) { for ( $ j = 0 ; $ j < $ dimensions ; ++ $ j ) { $ minors [ $ i ] [ $ j ] = self :: getDeterminantSegment ( $ matrix , $ i , $ j ) ; } } return $ minors ; }
Calculate the minors of the matrix

@param Matrix $matrix The matrix whose minors we wish to calculate
@return array[]
Calculate the minors of the matrix