From: Christian Bauer Date: Mon, 21 Jul 2003 17:38:23 +0000 (+0000) Subject: subs_no_pattern -> no_pattern, subs_algebraic -> algebraic X-Git-Tag: release_1-0-15~19 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=f64f91817d2756622274e72afbf58cfae16cfa87;hp=e2627379c98aeafae903cc2f04bdbdc9defa34f7 subs_no_pattern -> no_pattern, subs_algebraic -> algebraic --- diff --git a/ginac/basic.cpp b/ginac/basic.cpp index a296cf9a..e2bbc3cc 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -528,7 +528,7 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const { exmap::const_iterator it; - if (options & subs_options::subs_no_pattern) { + if (options & subs_options::no_pattern) { it = m.find(*this); if (it != m.end()) return it->second; @@ -536,7 +536,7 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const for (it = m.begin(); it != m.end(); ++it) { lst repl_lst; if (match(ex_to(it->first), repl_lst)) - return it->second.subs(repl_lst, options | subs_options::subs_no_pattern); // avoid infinite recursion when re-substituting the wildcards + return it->second.subs(repl_lst, options | subs_options::no_pattern); // avoid infinite recursion when re-substituting the wildcards } } diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 5abdbc04..fe096814 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -391,7 +391,7 @@ ex expairseq::subs(const exmap & m, unsigned options) const epvector *vp = subschildren(m, options); if (vp) return ex_to(thisexpairseq(vp, overall_coeff)); - else if ((options & subs_options::subs_algebraic) && is_exactly_a(*this)) + else if ((options & subs_options::algebraic) && is_exactly_a(*this)) return static_cast(this)->algebraic_subs_mul(m, options); else return subs_one_level(m, options); diff --git a/ginac/mul.cpp b/ginac/mul.cpp index 2c845651..9d2aac15 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -598,7 +598,7 @@ ex mul::algebraic_subs_mul(const exmap & m, unsigned options) const subsresult[j] = op(j); else { foundfirstsubsedfactor = true; - subsresult[j] = op(j) * power(it->second.subs(ex(repls), subs_options::subs_no_pattern) / it->first.subs(ex(repls), subs_options::subs_no_pattern), nummatches); + subsresult[j] = op(j) * power(it->second.subs(ex(repls), subs_options::no_pattern) / it->first.subs(ex(repls), subs_options::no_pattern), nummatches); } subsed[j] = true; } @@ -612,7 +612,7 @@ ex mul::algebraic_subs_mul(const exmap & m, unsigned options) const for (size_t j=0; jnops(); j++) { if (!subsed[j] && tryfactsubs(op(j), it->first, nummatches, repls)) { subsed[j] = true; - subsresult[j] = op(j) * power(it->second.subs(ex(repls), subs_options::subs_no_pattern) / it->first.subs(ex(repls), subs_options::subs_no_pattern), nummatches); + subsresult[j] = op(j) * power(it->second.subs(ex(repls), subs_options::no_pattern) / it->first.subs(ex(repls), subs_options::no_pattern), nummatches); } } } @@ -626,7 +626,7 @@ ex mul::algebraic_subs_mul(const exmap & m, unsigned options) const } } if (!subsfound) - return subs_one_level(m, options | subs_options::subs_algebraic); + return subs_one_level(m, options | subs_options::algebraic); exvector ev; ev.reserve(nops()); for (size_t i=0; i::max(); lst repls; if (tryfactsubs(*this, it->first, nummatches, repls)) - return (ex_to((*this) * power(it->second.subs(ex(repls), subs_options::subs_no_pattern) / it->first.subs(ex(repls), subs_options::subs_no_pattern), nummatches))).subs_one_level(m, options); + return (ex_to((*this) * power(it->second.subs(ex(repls), subs_options::no_pattern) / it->first.subs(ex(repls), subs_options::no_pattern), nummatches))).subs_one_level(m, options); } return subs_one_level(m, options);