subs_no_pattern -> no_pattern, subs_algebraic -> algebraic
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 21 Jul 2003 17:38:23 +0000 (17:38 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 21 Jul 2003 17:38:23 +0000 (17:38 +0000)
ginac/basic.cpp
ginac/expairseq.cpp
ginac/mul.cpp
ginac/power.cpp

index a296cf9..e2bbc3c 100644 (file)
@@ -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<basic>(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
                }
        }
 
index 5abdbc0..fe09681 100644 (file)
@@ -391,7 +391,7 @@ ex expairseq::subs(const exmap & m, unsigned options) const
        epvector *vp = subschildren(m, options);
        if (vp)
                return ex_to<basic>(thisexpairseq(vp, overall_coeff));
-       else if ((options & subs_options::subs_algebraic) && is_exactly_a<mul>(*this))
+       else if ((options & subs_options::algebraic) && is_exactly_a<mul>(*this))
                return static_cast<const mul *>(this)->algebraic_subs_mul(m, options);
        else
                return subs_one_level(m, options);
index 2c84565..9d2aac1 100644 (file)
@@ -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; j<this->nops(); 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<nops(); i++) {
index a30182e..64ebc71 100644 (file)
@@ -527,14 +527,14 @@ ex power::subs(const exmap & m, unsigned options) const
         || !are_ex_trivially_equal(exponent, subsed_exponent)) 
                return power(subsed_basis, subsed_exponent).subs_one_level(m, options);
 
-       if (!(options & subs_options::subs_algebraic))
+       if (!(options & subs_options::algebraic))
                return subs_one_level(m, options);
 
        for (exmap::const_iterator it = m.begin(); it != m.end(); ++it) {
                int nummatches = std::numeric_limits<int>::max();
                lst repls;
                if (tryfactsubs(*this, it->first, nummatches, repls))
-                       return (ex_to<basic>((*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<basic>((*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);