]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
Fix out-of-bounds error in multivar_diophant().
[ginac.git] / ginac / matrix.h
index 5c665dd6fc8e7713a6e5cb49a9c90f12a489cc18..02748413837452a84a50fd42da9162e4791514d9 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to symbolic matrices */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2018 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);
@@ -148,7 +148,8 @@ public:
        ex determinant(unsigned algo = determinant_algo::automatic) const;
        ex trace() const;
        ex charpoly(const ex & lambda) const;
-       matrix inverse() const;
+       matrix inverse() const { return inverse(solve_algo::automatic); }
+       matrix inverse(unsigned algo) const;
        matrix solve(const matrix & vars, const matrix & rhs,
                     unsigned algo = solve_algo::automatic) const;
        unsigned rank() const;
@@ -189,8 +190,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,7 +212,9 @@ 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(); }