- }
-#else
-;
-#endif // def INLINE_EX_CONSTRUCTORS
-
-
- // functions overriding virtual functions from bases classes
- // none
-
- // new virtual functions which can be overridden by derived classes
- // none
-
- // non-virtual functions in this class
-public:
- void swap(ex & other);
- void printraw(ostream & os) const;
- void printtree(ostream & os, unsigned indent=0) const;
- void print(ostream & os, unsigned upper_precedence=0) const;
- void printcsrc(ostream & os, unsigned type, const char *var_name) const;
- void dbgprint(void) const;
- void dbgprinttree(void) const;
- bool info(unsigned inf) const;
- unsigned nops() const;
- ex expand(unsigned options=0) const;
- bool has(const ex & other) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- bool has(basic const & other) const { return has(ex(other)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- int degree(const symbol & s) const;
- int ldegree(const symbol & s) const;
- ex coeff(const symbol & s, int n=1) const;
- ex lcoeff(const symbol & s) const { return coeff(s, degree(s)); }
- ex tcoeff(const symbol & s) const { return coeff(s, ldegree(s)); }
- ex numer(void) const;
- ex denom(void) const;
- ex unit(const symbol &x) const;
- ex content(const symbol &x) const;
- numeric integer_content(void) const;
- ex primpart(const symbol &x) const;
- ex primpart(const symbol &x, const ex &cont) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex primpart(const symbol &x, const basic &cont) const { return primpart(x,ex(cont)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- ex normal(int level = 0) const;
- ex smod(const numeric &xi) const;
- numeric max_coefficient(void) const;
- ex collect(const symbol & s) const;
- ex eval(int level = 0) const;
- ex evalf(int level = 0) const;
- ex diff(const symbol & s, unsigned nth = 1) const;
- ex series(const ex & r, int order) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex series(const basic & r, int order) const { return series(ex(r),order); }
-#endif // def CINT_CONVERSION_WORKAROUND
- ex subs(const lst & ls, const lst & lr) const;
- ex subs(const ex & e) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex subs(const basic & e) const { return subs(ex(e)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- exvector get_indices(void) const;
- ex simplify_ncmul(const exvector & v) const;
- ex operator[](const ex & index) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex operator[](const basic & index) const { return operator[](ex(index)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- ex operator[](int i) const;
- ex op(int i) const;
- ex & let_op(int i);
- ex lhs(void) const;
- ex rhs(void) const;
- int compare(const ex & other) const
-#ifdef INLINE_EX_CONSTRUCTORS
- {
- GINAC_ASSERT(bp!=0);
- GINAC_ASSERT(other.bp!=0);
- if (bp==other.bp) {
- // special case: both expression point to same basic, trivially equal
- return 0;
- }
- return bp->compare(*other.bp);
- }
-#else
-;
-#endif // def INLINE_EX_CONSTRUCTORS
-#ifdef CINT_CONVERSION_WORKAROUND
- int compare(const basic & other) const { return compare(ex(other)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- bool is_equal(const ex & other) const
-#ifdef INLINE_EX_CONSTRUCTORS
- {
- GINAC_ASSERT(bp!=0);
- GINAC_ASSERT(other.bp!=0);
- if (bp==other.bp) {
- // special case: both expression point to same basic, trivially equal
- return true;
- }
- return bp->is_equal(*other.bp);
- }
-#else
-;
-#endif // def INLINE_EX_CONSTRUCTORS
-#ifdef CINT_CONVERSION_WORKAROUND
- bool is_equal(const basic & other) const { return is_equal(ex(other)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- bool is_zero(void) const {return compare(_ex0())==0;};
-
- unsigned return_type(void) const;
- unsigned return_type_tinfo(void) const;
- unsigned gethash(void) const;
-
- ex exadd(const ex & rh) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex exadd(const basic & rh) const { return exadd(ex(rh)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- ex exmul(const ex & rh) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex exmul(const basic & rh) const { return exmul(ex(rh)); }
-#endif // def CINT_CONVERSION_WORKAROUND
- ex exncmul(const ex & rh) const;
-#ifdef CINT_CONVERSION_WORKAROUND
- ex exncmul(const basic & rh) const { return exncmul(ex(rh)); }
-#endif // def CINT_CONVERSION_WORKAROUND
-private:
- void construct_from_basic(const basic & other);
- void construct_from_int(int i);
- void construct_from_uint(unsigned int i);
- void construct_from_long(long i);
- void construct_from_ulong(unsigned long i);
- void construct_from_double(double d);
- void construct_from_string_and_lst(const string &s, const ex &l);
- void makewriteable();