]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
- first implementation of pattern matching
[ginac.git] / ginac / pseries.cpp
index 9d04f6a996346d42e5d60dd603702105a9b9867b..1477449c0bf3233f6f829549c14ad46cf3515f15 100644 (file)
@@ -393,13 +393,13 @@ ex pseries::evalf(int level) const
        return (new pseries(relational(var,point), new_seq))->setflag(status_flags::dynallocated | status_flags::evaluated);
 }
 
-ex pseries::subs(const lst & ls, const lst & lr) const
+ex pseries::subs(const lst & ls, const lst & lr, bool no_pattern) const
 {
        // If expansion variable is being substituted, convert the series to a
        // polynomial and do the substitution there because the result might
        // no longer be a power series
        if (ls.has(var))
-               return convert_to_poly(true).subs(ls, lr);
+               return convert_to_poly(true).subs(ls, lr, no_pattern);
        
        // Otherwise construct a new series with substituted coefficients and
        // expansion point
@@ -407,10 +407,10 @@ ex pseries::subs(const lst & ls, const lst & lr) const
        newseq.reserve(seq.size());
        epvector::const_iterator it = seq.begin(), itend = seq.end();
        while (it != itend) {
-               newseq.push_back(expair(it->rest.subs(ls, lr), it->coeff));
+               newseq.push_back(expair(it->rest.subs(ls, lr, no_pattern), it->coeff));
                ++it;
        }
-       return (new pseries(relational(var,point.subs(ls, lr)), newseq))->setflag(status_flags::dynallocated);
+       return (new pseries(relational(var,point.subs(ls, lr, no_pattern)), newseq))->setflag(status_flags::dynallocated);
 }
 
 /** Implementation of ex::expand() for a power series.  It expands all the