cofactor(row, column)
public
Show source
def cofactor(row, column)
raise RuntimeError, "cofactor of empty matrix is not defined" if empty?
Matrix.Raise ErrDimensionMismatch unless square?
det_of_minor = first_minor(row, column).determinant
det_of_minor * (-1) ** (row + column)
end