]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.h
* Avoid getrusage(2) on systems that don't have it (by ASheplyakov Alexei
[ginac.git] / ginac / power.h
index f808f97f44ed2fefe2c36ab53ea0435f88d16044..2a2c500471a887b38bf285b16bb891e504aff668 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symbolic exponentiation (basis^exponent). */
 
 /*
- *  GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2005 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
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 #ifndef __GINAC_POWER_H__
@@ -30,6 +30,7 @@ namespace GiNaC {
 
 class numeric;
 class add;
+class mul;
 
 /** This class holds a two-component object, a basis and and exponent
  *  representing exponentiation. */
@@ -48,7 +49,6 @@ public:
        
        // functions overriding virtual functions from base classes
 public:
-       void print(const print_context & c, unsigned level = 0) const;
        unsigned precedence() const {return 60;}
        bool info(unsigned inf) const;
        size_t nops() const;
@@ -63,9 +63,10 @@ public:
        ex series(const relational & s, int order, unsigned options = 0) const;
        ex subs(const exmap & m, unsigned options = 0) const;
        ex normal(exmap & repl, exmap & rev_lookup, int level = 0) const;
-       ex to_rational(lst &repl_lst) const;
-       ex to_polynomial(lst &repl_lst) const;
+       ex to_rational(exmap & repl) const;
+       ex to_polynomial(exmap & repl) const;
        exvector get_free_indices() const;
+       ex conjugate() const;
 protected:
        ex derivative(const symbol & s) const;
        ex eval_ncmul(const exvector & v) const;
@@ -78,9 +79,16 @@ protected:
        
        // non-virtual functions in this class
 protected:
-       ex expand_add(const add & a, int n) const;
-       ex expand_add_2(const add & a) const;
-       ex expand_mul(const mul & m, const numeric & n) const;
+       void print_power(const print_context & c, const char *powersymbol, const char *openbrace, const char *closebrace, unsigned level) const;
+       void do_print_dflt(const print_dflt & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
+       void do_print_csrc(const print_csrc & c, unsigned level) const;
+       void do_print_python(const print_python & c, unsigned level) const;
+       void do_print_python_repr(const print_python_repr & c, unsigned level) const;
+
+       ex expand_add(const add & a, int n, unsigned options) const;
+       ex expand_add_2(const add & a, unsigned options) const;
+       ex expand_mul(const mul & m, const numeric & n, unsigned options, bool from_expand = false) const;
        
 // member variables