]> www.ginac.de Git - ginac.git/commitdiff
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 a296cf9a4a75ac42edbaa80b200ac01ae1910250..e2bbc3cceb0d9b03ea9a8ca688c0a2c430020535 100644 (file)
@@ -528,7 +528,7 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const
 {
        exmap::const_iterator it;
 
 {
        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;
                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))
                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 5abdbc04b9e111c46f83176e58ad2845f9df76ef..fe09681496b98f2513e1e70a55e5dfc421667ac4 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));
        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);
                return static_cast<const mul *>(this)->algebraic_subs_mul(m, options);
        else
                return subs_one_level(m, options);
index 2c8456510a44d35201f5659dec50f27f32206e02..9d2aac1518dfc795e3c440b630884dec8bcad9c6 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);
                                        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;
                                }
                                        }
                                        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;
                        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)
                }
        }
        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++) {
 
        exvector ev; ev.reserve(nops());
        for (size_t i=0; i<nops(); i++) {
index a30182ef1b7320d5088d6d3ad542a6336ac33e9c..64ebc71746c6162211993db9f59521ec244c668f 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);
 
         || !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 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);
        }
 
        return subs_one_level(m, options);