// functions overriding virtual functions from bases classes
public:
basic * duplicate() const;
- void print(std::ostream & os, unsigned upper_precedence=0) const;
- void printraw(std::ostream & os) const;
- void printtree(std::ostream & os, unsigned indent) const;
+ void print(const print_context & c, unsigned level = 0) const;
+ unsigned precedence(void) const {return 10;}
bool info(unsigned inf) const;
unsigned nops() const;
ex op(int i) const;
ex evalf(int level=0) const;
ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
ex to_rational(lst &repl_lst) const;
- ex subs(const lst & ls, const lst & lr) const;
+ bool match(const ex & pattern, lst & repl_lst) const;
+ ex subs(const lst & ls, const lst & lr, bool no_pattern = false) const;
protected:
ex derivative(const symbol & s) const;
int compare_same_type(const basic & other) const;
protected:
virtual ex thisexpairseq(const epvector & v, const ex & oc) const;
virtual ex thisexpairseq(epvector * vp, const ex & oc) const;
- virtual void printseq(std::ostream & os, char delim,
+ virtual void printseq(const print_context & c, char delim,
unsigned this_precedence,
unsigned upper_precedence) const;
- virtual void printpair(std::ostream & os, const expair & p,
+ virtual void printpair(const print_context & c, const expair & p,
unsigned upper_precedence) const;
virtual expair split_ex_to_pair(const ex & e) const;
virtual expair combine_ex_with_coeff_to_pair(const ex & e,
epvector evalfchildren(int level) const;
epvector normalchildren(int level) const;
epvector diffchildren(const symbol & s) const;
- epvector * subschildren(const lst & ls, const lst & lr) const;
+ epvector * subschildren(const lst & ls, const lst & lr, bool no_pattern = false) const;
// member variables
protected:
epvector seq;
ex overall_coeff;
- static unsigned precedence;
#if EXPAIRSEQ_USE_HASHTAB
epplistvector hashtab;
unsigned hashtabsize;