54 bool info(
unsigned inf)
const override;
55 size_t nops()
const override;
56 ex op(
size_t i)
const override;
59 int degree(
const ex & s)
const override;
61 ex coeff(
const ex & s,
int n = 1)
const override;
67 bool has(
const ex & other,
unsigned options = 0)
const override;
90 void print_power(
const print_context &
c,
const char *powersymbol,
const char *openbrace,
const char *closebrace,
unsigned level)
const;
118 return dynallocate<power>(b, e);
120 template<
typename T1,
typename T2>
121 inline ex pow(
const T1 & b,
const T2 & e)
123 return dynallocate<power>(
ex(b),
ex(e));
135 #endif // ndef GINAC_POWER_H void do_print_csrc(const print_csrc &c, unsigned level) const
void do_print_latex(const print_latex &c, unsigned level) const
ex normal(exmap &repl, exmap &rev_lookup, lst &modifier) const override
Implementation of ex::normal() for powers.
void do_print_csrc_cl_N(const print_csrc_cl_N &c, unsigned level) const
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
ex imag_part() const override
This class holds a relation consisting of two expressions and a logical relation between them...
ex evalm() const override
Evaluate sums, products and integer powers of matrices.
unsigned return_type() const override
return_type_t return_type_tinfo() const override
Archiving of GiNaC expressions.
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Context for python-parsable output.
ex coeff(const ex &s, int n=1) const override
Return coefficient of degree n in object s.
int ldegree(const ex &s) const override
Return degree of lowest power in object s.
Context for python pretty-print output.
Context for default (ginsh-parsable) output.
ex subs(const exmap &m, unsigned options=0) const override
Substitute a set of objects by arbitrary expressions.
int degree(const ex &s) const override
Return degree of highest power in object s.
This class is a wrapper around CLN-numbers within the GiNaC class hierarchy.
Context for latex-parsable output.
size_t nops() const override
Number of operands/members.
ex to_rational(exmap &repl) const override
Implementation of ex::to_rational() for powers.
static ex expand_add(const add &a, long n, unsigned options)
expand a^n where a is an add and n is a positive integer.
ex derivative(const symbol &s) const override
Implementation of ex::diff() for a power.
ex map(map_function &f) const override
Construct new expression by applying the specified function to all sub-expressions (one level only...
To distinguish between different kinds of non-commutative objects.
static ex expand_mul(const mul &m, const numeric &n, unsigned options, bool from_expand=false)
Expand factors of m in m^n where m is a mul and n is an integer.
std::vector< ex > exvector
std::map< ex, ex, ex_is_less > exmap
power(const ex &lh, const T &rh)
const numeric sqrt(const numeric &x)
Numeric square root.
Function object for map().
Interface to GiNaC's light-weight expression handles.
Base class for print_contexts.
ex eval() const override
Perform automatic term rewriting rules in this class.
const numeric pow(const numeric &x, const numeric &y)
ex series(const relational &s, int order, unsigned options=0) const override
Implementation of ex::series() for powers.
Interface to GiNaC's ABC.
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
bool info(unsigned inf) const override
Information about the object.
void archive(archive_node &n) const override
Save (a.k.a.
ex evalf() const override
Evaluate object numerically.
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
Lightweight wrapper for GiNaC's symbolic objects.
ex to_polynomial(exmap &repl) const override
Implementation of ex::to_polynomial() for powers.
This class holds a two-component object, a basis and and exponent representing exponentiation.
static ex expand_add_2(const add &a, unsigned options)
Special case of power::expand_add.
void do_print_python_repr(const print_python_repr &c, unsigned level) const
void do_print_python(const print_python &c, unsigned level) const
void do_print_dflt(const print_dflt &c, unsigned level) const
ex eval_ncmul(const exvector &v) const override
Context for C source output using CLN numbers.
Wrapper template for making GiNaC classes out of STL containers.
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
ex real_part() const override
Base context for C source output.
GINAC_DECLARE_UNARCHIVER(add)
ex expand(unsigned options=0) const override
Expand expression, i.e.
ex op(size_t i) const override
Return operand/member at position i.
void print_power(const print_context &c, const char *powersymbol, const char *openbrace, const char *closebrace, unsigned level) const
bool is_polynomial(const ex &var) const override
Check whether this is a polynomial in the given variables.
bool has(const ex &other, unsigned options=0) const override
Test for occurrence of a pattern.
ex conjugate() const override