#include "basic.h"
#include "ex.h"
+#include "archive.h"
namespace GiNaC {
// other constructors
public:
- power(const ex & lh, const ex & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
- template<typename T> power(const ex & lh, const T & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
+ power(const ex & lh, const ex & rh) : basis(lh), exponent(rh) {}
+ template<typename T> power(const ex & lh, const T & rh) : basis(lh), exponent(rh) {}
// functions overriding virtual functions from base classes
public:
ex conjugate() const;
ex real_part() const;
ex imag_part() const;
+ /** Save (a.k.a. serialize) object into archive. */
+ void archive(archive_node& n) const;
+ /** Read (a.k.a. deserialize) object from archive. */
+ void read_archive(const archive_node& n, lst& syms);
protected:
ex derivative(const symbol & s) const;
ex eval_ncmul(const exvector & v) const;
ex basis;
ex exponent;
};
+GINAC_DECLARE_UNARCHIVER(power);
// wrapper functions