]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
Happy New Year!
[ginac.git] / ginac / matrix.h
index 5c665dd6fc8e7713a6e5cb49a9c90f12a489cc18..b1ee32814b926f15d4a90b6387770394d01214ae 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to symbolic matrices */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 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
@@ -102,7 +102,7 @@ public:
        matrix(unsigned r, unsigned c, const lst & l);
        matrix(std::initializer_list<std::initializer_list<ex>> l);
 
-       matrix_init<ex, exvector::iterator> operator=(const ex & x) deprecated;
+       matrix_init<ex, exvector::iterator> operator=(const ex & x) attribute_deprecated;
 protected:
        matrix(unsigned r, unsigned c, const exvector & m2);
        matrix(unsigned r, unsigned c, exvector && m2);
@@ -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<unsigned> 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<unsigned> 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;
@@ -189,8 +193,8 @@ inline size_t nops(const matrix & m)
 inline ex expand(const matrix & m, unsigned options = 0)
 { return m.expand(options); }
 
-inline ex evalf(const matrix & m, int level = 0)
-{ return m.evalf(level); }
+inline ex evalf(const matrix & m)
+{ return m.evalf(); }
 
 inline unsigned rows(const matrix & m)
 { return m.rows(); }
@@ -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