]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
Univariate Hensel lifting now uses upoly.
[ginac.git] / ginac / pseries.cpp
index 0da6ae8d4854908fc1e59e116e036ae56e433e66..15fac1fdfe7a164f5eb16ee326d04f325c66db24 100644 (file)
@@ -4,7 +4,7 @@
  *  methods for series expansion. */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(pseries, basic,
  *  Default constructor
  */
 
-pseries::pseries() : inherited(&pseries::tinfo_static) { }
+pseries::pseries() { }
 
 
 /*
@@ -68,7 +68,7 @@ pseries::pseries() : inherited(&pseries::tinfo_static) { }
  *  @param rel_  expansion variable and point (must hold a relational)
  *  @param ops_  vector of {coefficient, power} pairs (coefficient must not be zero)
  *  @return newly constructed pseries */
-pseries::pseries(const ex &rel_, const epvector &ops_) : basic(&pseries::tinfo_static), seq(ops_)
+pseries::pseries(const ex &rel_, const epvector &ops_) : seq(ops_)
 {
        GINAC_ASSERT(is_a<relational>(rel_));
        GINAC_ASSERT(is_a<symbol>(rel_.lhs()));
@@ -81,8 +81,9 @@ pseries::pseries(const ex &rel_, const epvector &ops_) : basic(&pseries::tinfo_s
  *  Archiving
  */
 
-pseries::pseries(const archive_node &n, lst &sym_lst) : inherited(n, sym_lst)
+void pseries::read_archive(const archive_node &n, lst &sym_lst) 
 {
+       inherited::read_archive(n, sym_lst);
        archive_node::archive_node_cit first = n.find_first("coeff");
        archive_node::archive_node_cit last = n.find_last("power");
        ++last;
@@ -113,7 +114,6 @@ void pseries::archive(archive_node &n) const
        n.add_ex("point", point);
 }
 
-DEFAULT_UNARCHIVE(pseries)
 
 //////////
 // functions overriding virtual functions from base classes
@@ -1280,12 +1280,10 @@ ex ex::series(const ex & r, int order, unsigned options) const
        else
                throw (std::logic_error("ex::series(): expansion point has unknown type"));
        
-       try {
-               e = bp->series(rel_, order, options);
-       } catch (std::exception &x) {
-               throw (std::logic_error(std::string("unable to compute series (") + x.what() + ")"));
-       }
+       e = bp->series(rel_, order, options);
        return e;
 }
 
+GINAC_BIND_UNARCHIVER(pseries);
+
 } // namespace GiNaC