23 #ifndef GINAC_EXPAIRSEQ_H 24 #define GINAC_EXPAIRSEQ_H 34 typedef epvector::iterator
epp;
63 bool info(
unsigned inf)
const override;
64 size_t nops()
const override;
65 ex op(
size_t i)
const override;
70 bool match(
const ex & pattern,
exmap& repl_lst)
const override;
87 unsigned this_precedence,
88 unsigned upper_precedence)
const;
90 unsigned upper_precedence)
const;
142 for (epvector::const_iterator i=epv.begin(); i!=epv.end(); ++i)
150 for (exvector::const_iterator i=v.begin(); i!=v.end(); ++i)
161 dummies_of_factor =
x.get_free_indices();
164 if (dummies_of_factor.size() == 0)
166 sort(dummies_of_factor.begin(), dummies_of_factor.end(),
ex_is_less());
168 dummies_of_factor,
x);
177 dummies_of_factor.begin(), dummies_of_factor.end(),
178 std::back_insert_iterator<exvector>(new_dummy_indices),
ex_is_less());
187 #endif // ndef GINAC_EXPAIRSEQ_H virtual expair split_ex_to_pair(const ex &e) const
void do_print(const print_context &c, unsigned level) const
Interface to GiNaC's indexed expressions.
A sequence of class expair.
bool match(const ex &pattern, exmap &repl_lst) const override
Check whether the expression matches a given pattern.
exvector get_all_dummy_indices_safely(const ex &e)
More reliable version of the form.
virtual ex recombine_pair_to_ex(const expair &p) const
make_flat_inserter(const epvector &epv, bool b)
void combine_same_terms_sorted_seq()
ex to_rational(exmap &repl) const override
Implementation of ex::to_rational() for expairseqs.
bool is_equal(const ex &other) const
virtual ex default_overall_coeff() const
epvector expandchildren(unsigned options) const
bool info(unsigned inf) const override
Information about the object.
void do_print_tree(const print_tree &c, unsigned level) const
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
bool are_ex_trivially_equal(const ex &e1, const ex &e2)
Compare two objects of class quickly without doing a deep tree traversal.
unsigned return_type() const override
ex subs(const exmap &m, unsigned options=0) const override
Substitute a set of objects by arbitrary expressions.
ex expand(unsigned options=0) const override
Expand expression, i.e.
ex map(map_function &f) const override
Construct new expression by applying the specified function to all sub-expressions (one level only...
virtual void printseq(const print_context &c, char delim, unsigned this_precedence, unsigned upper_precedence) const
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
Class to handle the renaming of dummy indices.
This class is a wrapper around CLN-numbers within the GiNaC class hierarchy.
virtual expair combine_ex_with_coeff_to_pair(const ex &e, const ex &c) const
void construct_from_epvector(const epvector &v, bool do_index_renaming=false)
virtual ex thisexpairseq(const epvector &v, const ex &oc, bool do_index_renaming=false) const
virtual expair combine_pair_with_coeff_to_pair(const expair &p, const ex &c) const
Definition of expression pairs (building blocks of expairseq).
epvector * conjugateepvector(const epvector &)
Complex conjugate every element of an epvector.
void construct_from_expairseq_ex(const expairseq &s, const ex &e)
void construct_from_2_ex(const ex &lh, const ex &rh)
ex eval() const override
Perform automatic non-interruptive term rewriting rules.
std::vector< ex > exvector
std::map< ex, ex, ex_is_less > exmap
ex conjugate() const override
epvector::iterator epp
expair-vector pointer
virtual bool can_make_flat(const expair &p) const
unsigned calchash() const override
Compute the hash value of an object and if it makes sense to store it in the objects status_flags...
Function object for map().
Base class for print_contexts.
ex op(size_t i) const override
Return operand/member at position i.
epvector subschildren(const exmap &m, unsigned options=0) const
virtual bool expair_needs_further_processing(epp it)
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.
virtual void combine_overall_coeff(const ex &c)
lst rename_dummy_indices_uniquely(const exvector &va, const exvector &vb)
Similar to above, where va and vb are the same and the return value is a list of two lists for substi...
ex coeff(const ex &thisex, const ex &s, int n=1)
bool is_equal_same_type(const basic &other) const override
Returns true if two objects of same type are equal.
Wrapper template for making GiNaC classes out of STL containers.
expairseq(const ex &lh, const ex &rh)
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
make_flat_inserter(const exvector &v, bool b)
void make_flat(const exvector &v)
ex handle_factor(const ex &x, const ex &coeff)
std::vector< expair > epvector
expair-vector
bool is_canonical() const
void read_archive(const archive_node &n, lst &syms) override
Load (deserialize) the object from an archive node.
size_t nops() const override
Number of operands/members.
void construct_from_exvector(const exvector &v)
void combine_indices(const exvector &dummies_of_factor)
Context for tree-like output for debugging.
virtual void printpair(const print_context &c, const expair &p, unsigned upper_precedence) const
void archive(archive_node &n) const override
Save (serialize) the object into archive node.
void construct_from_2_expairseq(const expairseq &s1, const expairseq &s2)
ex to_polynomial(exmap &repl) const override
Implementation of ex::to_polynomial() for expairseqs.
epvector evalchildren() const