X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fmatrix.h;h=b1ee32814b926f15d4a90b6387770394d01214ae;hb=b16d5b34f40c9dcd6bd4f9e1fdeeb65cb1612db3;hp=2b0934e821631774fe4d2e76ef4e7f254a148658;hpb=761d1597532504762c1f9b438c7727c4f74d7da3;p=ginac.git diff --git a/ginac/matrix.h b/ginac/matrix.h index 2b0934e8..b1ee3281 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -3,7 +3,7 @@ * Interface to symbolic matrices */ /* - * GiNaC Copyright (C) 1999-2017 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -149,15 +149,19 @@ public: ex trace() const; ex charpoly(const ex & lambda) const; matrix inverse() const; + matrix inverse(unsigned algo) const; matrix solve(const matrix & vars, const matrix & rhs, unsigned algo = solve_algo::automatic) const; unsigned rank() const; + unsigned rank(unsigned solve_algo) const; bool is_zero_matrix() const; protected: ex determinant_minor() const; + std::vector echelon_form(unsigned algo, int n); int gauss_elimination(const bool det = false); int division_free_elimination(const bool det = false); int fraction_free_elimination(const bool det = false); + std::vector markowitz_elimination(unsigned n); int pivot(unsigned ro, unsigned co, bool symbolic = true); void print_elements(const print_context & c, const char *row_start, const char *row_end, const char *row_sep, const char *col_sep) const; @@ -211,10 +215,14 @@ inline ex charpoly(const matrix & m, const ex & lambda) { return m.charpoly(lambda); } inline matrix inverse(const matrix & m) -{ return m.inverse(); } +{ return m.inverse(solve_algo::automatic); } +inline matrix inverse(const matrix & m, unsigned algo) +{ return m.inverse(algo); } inline unsigned rank(const matrix & m) { return m.rank(); } +inline unsigned rank(const matrix & m, unsigned solve_algo) +{ return m.rank(solve_algo); } // utility functions