X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fmatrix.cpp;h=80ca3e459ff42a4002920fd68466054e0398c42a;hb=1be7026a705dfefedcd838e6b60795ca6d469bf9;hp=915d4543e9b39c592a51f70713bcdf096370f0aa;hpb=40234423820294740aa535a713c2784d1bb23351;p=ginac.git diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index 915d4543..80ca3e45 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -939,10 +939,11 @@ ex matrix::charpoly(const ex & lambda) const /** Inverse of this matrix. * + * @param algo selects the algorithm (one of solve_algo) * @return the inverted matrix * @exception logic_error (matrix not square) * @exception runtime_error (singular matrix) */ -matrix matrix::inverse() const +matrix matrix::inverse(unsigned algo) const { if (row != col) throw (std::logic_error("matrix::inverse(): matrix not square")); @@ -965,7 +966,7 @@ matrix matrix::inverse() const matrix sol(row,col); try { - sol = this->solve(vars,identity); + sol = this->solve(vars, identity, algo); } catch (const std::runtime_error & e) { if (e.what()==std::string("matrix::solve(): inconsistent linear system")) throw (std::runtime_error("matrix::inverse(): singular matrix"));