#include "basic.h"
#include "ex.h"
+namespace std {
+ // forward declaration, so <stdexcept> need not be included:
+ class range_error;
+}
+
#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
#endif // ndef NO_NAMESPACE_GINAC
// functions overriding virtual functions from bases classes
public:
basic * duplicate() const;
- void print(ostream & os, unsigned upper_precedence=0) const;
- void printraw(ostream & os) const;
+ void print(std::ostream & os, unsigned upper_precedence=0) const;
+ void printraw(std::ostream & os) const;
unsigned nops() const;
ex op(int i) const;
ex & let_op(int i);
matrix transpose(void) const;
ex determinant(void) const;
ex trace(void) const;
- ex charpoly(const ex & lambda) const;
+ ex charpoly(const symbol & lambda) const;
matrix inverse(void) const;
matrix fraction_free_elim(const matrix & vars, const matrix & v) const;
matrix solve(const matrix & vars, const matrix & rhs) const;
matrix old_solve(const matrix & v) const; // FIXME: may be removed
protected:
- ex determinant_numeric(void) const;
- ex determinant_minor_sparse(void) const;
- ex determinant_minor_dense(void) const;
- ex determinant_bareiss(void) const;
- ex determinant_perm(void) const;
+ ex determinant_minor(void) const;
int gauss_elimination(void);
- int fraction_free_elimination(void);
int division_free_elimination(void);
+ int fraction_free_elimination(bool det = false);
int pivot(unsigned ro, bool symbolic=true);
-private: // FIXME: these should be obsoleted
- void ffe_swap(unsigned r1, unsigned c1, unsigned r2 ,unsigned c2);
- void ffe_set(unsigned r, unsigned c, ex e);
- ex ffe_get(unsigned r, unsigned c) const;
+ void swap(unsigned r1, unsigned c1, unsigned r2 ,unsigned c2);
// member variables
protected:
static unsigned precedence;
};
+
// global constants
extern const matrix some_matrix;
extern const type_info & typeid_matrix;
+
// wrapper functions around member functions
inline unsigned nops(const matrix & m)
inline ex trace(const matrix & m)
{ return m.trace(); }
-inline ex charpoly(const matrix & m, const ex & lambda)
+inline ex charpoly(const matrix & m, const symbol & lambda)
{ return m.charpoly(lambda); }
inline matrix inverse(const matrix & m)