]> www.ginac.de Git - ginac.git/commitdiff
- collect() works better
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 21 Feb 2000 20:08:03 +0000 (20:08 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 21 Feb 2000 20:08:03 +0000 (20:08 +0000)
ginac/pseries.cpp
ginac/pseries.h

index 9b6f64a944a788606cd3c11a0ce5f3981fca7087..4491915841b1cd746d32cde71c8effc395257d4c 100644 (file)
@@ -256,6 +256,14 @@ ex pseries::coeff(const symbol &s, int n) const
         return convert_to_poly().coeff(s, n);
 }
 
+ex pseries::collect(const symbol &s) const
+{
+       if (var.is_equal(s))
+               return convert_to_poly();
+       else
+               return inherited::collect(s);
+}
+
 ex pseries::eval(int level) const
 {
     if (level == 1)
index ff575bbedf464955ff919c599c966758fefb6295..bf05af9b26b5a14175b33a10e15b6a146743f6bf 100644 (file)
@@ -63,6 +63,7 @@ public:
     int degree(const symbol &s) const;
     int ldegree(const symbol &s) const;
     ex coeff(const symbol &s, int n=1) const;
+    ex collect(const symbol &s) const;
     ex eval(int level=0) const;
     ex evalf(int level=0) const;
     ex series(const symbol & s, const ex & p, int order) const;