47 size_t nops()
const override;
48 ex op(
size_t i)
const override;
49 int degree(
const ex &s)
const override;
51 ex coeff(
const ex &s,
int n = 1)
const override;
52 ex collect(
const ex &s,
bool distributed =
false)
const override;
106 void print_series(
const print_context &
c,
const char *openbrace,
const char *closebrace,
const char *mul_sym,
const char *pow_sym,
unsigned level)
const;
138 return (ex_to<pseries>(e).convert_to_poly(
true));
Interface to GiNaC's ABC.
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Wrapper template for making GiNaC classes out of STL containers.
Lightweight wrapper for GiNaC's symbolic objects.
bool is_equal(const ex &other) const
This class is a wrapper around CLN-numbers within the GiNaC class hierarchy.
Base class for print_contexts.
Context for latex-parsable output.
Context for python-parsable output.
Context for python pretty-print output.
Context for tree-like output for debugging.
This class holds a extended truncated power series (positive and negative integer powers).
int ldegree(const ex &s) const override
Return degree of lowest power of the series.
ex evalf() const override
Evaluate coefficients numerically.
ex var
Series variable (holds a symbol)
bool is_zero() const
Check whether series has the value zero.
pseries shift_exponents(int deg) const
Return a new pseries object with the powers shifted by deg.
void do_print(const print_context &c, unsigned level) const
ex op(size_t i) const override
Return the ith term in the series when represented as a sum.
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
void do_print_latex(const print_latex &c, unsigned level) const
ex mul_const(const numeric &other) const
Multiply a pseries object with a numeric constant, producing a pseries object that represents the pro...
ex coeff(const ex &s, int n=1) const override
Return coefficient of degree n in power series if s is the expansion variable.
ex get_point() const
Get the expansion point.
void do_print_tree(const print_tree &c, unsigned level) const
ex convert_to_poly(bool no_order=false) const
Convert the pseries object to an ordinary polynomial.
size_t nops() const override
Return the number of operands including a possible order term.
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
ex subs(const exmap &m, unsigned options=0) const override
Substitute a set of objects by arbitrary expressions.
pseries(const ex &rel_, const epvector &ops_)
Construct pseries from a vector of coefficients and powers.
ex eval_integ() const override
Evaluate integrals, if result is known.
ex expand(unsigned options=0) const override
Implementation of ex::expand() for a power series.
ex derivative(const symbol &s) const override
Implementation of ex::diff() for a power series.
ex real_part() const override
ex evalm() const override
Evaluate sums, products and integer powers of matrices.
epvector seq
Vector of {coefficient, power} pairs.
bool is_compatible_to(const pseries &other) const
Check whether series is compatible to another series (expansion variable and point are the same.
ex exponop(size_t i) const
ex coeffop(size_t i) const
Get coefficients and exponents.
void archive(archive_node &n) const override
Save (a.k.a.
void print_series(const print_context &c, const char *openbrace, const char *closebrace, const char *mul_sym, const char *pow_sym, unsigned level) const
ex series(const relational &r, int order, unsigned options=0) const override
Re-expansion of a pseries object.
void do_print_python(const print_python &c, unsigned level) const
ex normal(exmap &repl, exmap &rev_lookup, lst &modifier) const override
Implementation of ex::normal() for pseries.
ex get_var() const
Get the expansion variable.
ex imag_part() const override
void do_print_python_repr(const print_python_repr &c, unsigned level) const
bool is_terminating() const
Returns true if there is no order term, i.e.
ex conjugate() const override
ex mul_series(const pseries &other) const
Multiply one pseries object to another, producing a pseries object that represents the product.
ex power_const(const numeric &p, int deg) const
Compute the p-th power of a series.
int degree(const ex &s) const override
Return degree of highest power of the series.
ex add_series(const pseries &other) const
Add one series object to another, producing a pseries object that represents the sum.
ex collect(const ex &s, bool distributed=false) const override
Does nothing.
ex eval() const override
Perform coefficient-wise automatic term rewriting rules in this class.
This class holds a relation consisting of two expressions and a logical relation between them.
Interface to sequences of expression pairs.
std::map< ex, ex, ex_is_less > exmap
std::vector< expair > epvector
expair-vector
GINAC_DECLARE_UNARCHIVER(add)
ex series_to_poly(const ex &e)
Convert the pseries object embedded in an expression to an ordinary polynomial in the expansion varia...
bool is_terminating(const pseries &s)
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.