GiNaC 1.8.7
|
A sequence of class expair. More...
#include <expairseq.h>
Public Member Functions | |
expairseq (const ex &lh, const ex &rh) | |
expairseq (const exvector &v) | |
expairseq (const epvector &v, const ex &oc, bool do_index_renaming=false) | |
expairseq (epvector &&vp, const ex &oc, bool do_index_renaming=false) | |
unsigned | precedence () const override |
Return relative operator precedence (for parenthezing output). More... | |
bool | info (unsigned inf) const override |
Information about the object. More... | |
size_t | nops () const override |
Number of operands/members. More... | |
ex | op (size_t i) const override |
Return operand/member at position i. More... | |
ex | map (map_function &f) const override |
Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively). More... | |
ex | eval () const override |
Perform coefficient-wise automatic term rewriting rules in this class. More... | |
ex | to_rational (exmap &repl) const override |
Implementation of ex::to_rational() for expairseqs. More... | |
ex | to_polynomial (exmap &repl) const override |
Implementation of ex::to_polynomial() for expairseqs. More... | |
bool | match (const ex &pattern, exmap &repl_lst) const override |
Check whether the expression matches a given pattern. More... | |
ex | subs (const exmap &m, unsigned options=0) const override |
Substitute a set of objects by arbitrary expressions. More... | |
ex | conjugate () const override |
void | archive (archive_node &n) const override |
Save (serialize) the object into archive node. More... | |
void | read_archive (const archive_node &n, lst &syms) override |
Load (deserialize) the object from an archive node. More... | |
Public Member Functions inherited from GiNaC::basic | |
virtual | ~basic () |
basic destructor, virtual because class ex will delete objects of derived classes via a basic*. More... | |
basic (const basic &other) | |
const basic & | operator= (const basic &other) |
basic assignment operator: the other object might be of a derived class. More... | |
virtual basic * | duplicate () const |
Create a clone of this object on the heap. More... | |
virtual ex | eval () const |
Perform automatic non-interruptive term rewriting rules. More... | |
virtual ex | evalf () const |
Evaluate object numerically. More... | |
virtual ex | evalm () const |
Evaluate sums, products and integer powers of matrices. More... | |
virtual ex | eval_integ () const |
Evaluate integrals, if result is known. More... | |
virtual ex | eval_indexed (const basic &i) const |
Perform automatic symbolic evaluations on indexed expression that contains this object as the base expression. More... | |
virtual void | print (const print_context &c, unsigned level=0) const |
Output to stream. More... | |
virtual void | dbgprint () const |
Little wrapper around print to be called within a debugger. More... | |
virtual void | dbgprinttree () const |
Little wrapper around printtree to be called within a debugger. More... | |
virtual unsigned | precedence () const |
Return relative operator precedence (for parenthezing output). More... | |
virtual bool | info (unsigned inf) const |
Information about the object. More... | |
virtual size_t | nops () const |
Number of operands/members. More... | |
virtual ex | op (size_t i) const |
Return operand/member at position i. More... | |
virtual ex | operator[] (const ex &index) const |
virtual ex | operator[] (size_t i) const |
virtual ex & | let_op (size_t i) |
Return modifiable operand/member at position i. More... | |
virtual ex & | operator[] (const ex &index) |
virtual ex & | operator[] (size_t i) |
virtual bool | has (const ex &other, unsigned options=0) const |
Test for occurrence of a pattern. More... | |
virtual bool | match (const ex &pattern, exmap &repls) const |
Check whether the expression matches a given pattern. More... | |
virtual ex | subs (const exmap &m, unsigned options=0) const |
Substitute a set of objects by arbitrary expressions. More... | |
virtual ex | map (map_function &f) const |
Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively). More... | |
virtual void | accept (GiNaC::visitor &v) const |
virtual bool | is_polynomial (const ex &var) const |
Check whether this is a polynomial in the given variables. More... | |
virtual int | degree (const ex &s) const |
Return degree of highest power in object s. More... | |
virtual int | ldegree (const ex &s) const |
Return degree of lowest power in object s. More... | |
virtual ex | coeff (const ex &s, int n=1) const |
Return coefficient of degree n in object s. More... | |
virtual ex | expand (unsigned options=0) const |
Expand expression, i.e. More... | |
virtual ex | collect (const ex &s, bool distributed=false) const |
Sort expanded expression in terms of powers of some object(s). More... | |
virtual ex | series (const relational &r, int order, unsigned options=0) const |
Default implementation of ex::series(). More... | |
virtual ex | normal (exmap &repl, exmap &rev_lookup, lst &modifier) const |
Default implementation of ex::normal(). More... | |
virtual ex | to_rational (exmap &repl) const |
Default implementation of ex::to_rational(). More... | |
virtual ex | to_polynomial (exmap &repl) const |
virtual numeric | integer_content () const |
virtual ex | smod (const numeric &xi) const |
Apply symmetric modular homomorphism to an expanded multivariate polynomial. More... | |
virtual numeric | max_coefficient () const |
Implementation ex::max_coefficient(). More... | |
virtual exvector | get_free_indices () const |
Return a vector containing the free indices of an expression. More... | |
virtual ex | add_indexed (const ex &self, const ex &other) const |
Add two indexed expressions. More... | |
virtual ex | scalar_mul_indexed (const ex &self, const numeric &other) const |
Multiply an indexed expression with a scalar. More... | |
virtual bool | contract_with (exvector::iterator self, exvector::iterator other, exvector &v) const |
Try to contract two indexed expressions that appear in the same product. More... | |
virtual unsigned | return_type () const |
virtual return_type_t | return_type_tinfo () const |
virtual ex | conjugate () const |
virtual ex | real_part () const |
virtual ex | imag_part () const |
template<class T > | |
void | print_dispatch (const print_context &c, unsigned level) const |
Like print(), but dispatch to the specified class. More... | |
void | print_dispatch (const registered_class_info &ri, const print_context &c, unsigned level) const |
Like print(), but dispatch to the specified class. More... | |
virtual void | archive (archive_node &n) const |
Save (serialize) the object into archive node. More... | |
virtual void | read_archive (const archive_node &n, lst &syms) |
Load (deserialize) the object from an archive node. More... | |
ex | subs_one_level (const exmap &m, unsigned options) const |
Helper function for subs(). More... | |
ex | diff (const symbol &s, unsigned nth=1) const |
Default interface of nth derivative ex::diff(s, n). More... | |
int | compare (const basic &other) const |
Compare objects syntactically to establish canonical ordering. More... | |
bool | is_equal (const basic &other) const |
Test for syntactic equality. More... | |
const basic & | hold () const |
Stop further evaluation. More... | |
unsigned | gethash () const |
const basic & | setflag (unsigned f) const |
Set some status_flags. More... | |
const basic & | clearflag (unsigned f) const |
Clear some status_flags. More... | |
Public Member Functions inherited from GiNaC::refcounted | |
refcounted () noexcept | |
unsigned int | add_reference () noexcept |
unsigned int | remove_reference () noexcept |
unsigned int | get_refcount () const noexcept |
void | set_refcount (unsigned int r) noexcept |
Protected Member Functions | |
bool | is_equal_same_type (const basic &other) const override |
Returns true if two objects of same type are equal. More... | |
unsigned | return_type () const override |
unsigned | calchash () const override |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so. More... | |
ex | expand (unsigned options=0) const override |
Expand expression, i.e. More... | |
virtual ex | thisexpairseq (const epvector &v, const ex &oc, bool do_index_renaming=false) const |
Create an object of this type. More... | |
virtual ex | thisexpairseq (epvector &&vp, const ex &oc, bool do_index_renaming=false) const |
virtual void | printseq (const print_context &c, char delim, unsigned this_precedence, unsigned upper_precedence) const |
virtual void | printpair (const print_context &c, const expair &p, unsigned upper_precedence) const |
virtual expair | split_ex_to_pair (const ex &e) const |
Form an expair from an ex, using the corresponding semantics. More... | |
virtual expair | combine_ex_with_coeff_to_pair (const ex &e, const ex &c) const |
virtual expair | combine_pair_with_coeff_to_pair (const expair &p, const ex &c) const |
virtual ex | recombine_pair_to_ex (const expair &p) const |
Form an ex out of an expair, using the corresponding semantics. More... | |
virtual bool | expair_needs_further_processing (epp it) |
virtual ex | default_overall_coeff () const |
virtual void | combine_overall_coeff (const ex &c) |
virtual void | combine_overall_coeff (const ex &c1, const ex &c2) |
virtual bool | can_make_flat (const expair &p) const |
void | do_print (const print_context &c, unsigned level) const |
void | do_print_tree (const print_tree &c, unsigned level) const |
void | construct_from_2_ex (const ex &lh, const ex &rh) |
void | construct_from_2_expairseq (const expairseq &s1, const expairseq &s2) |
void | construct_from_expairseq_ex (const expairseq &s, const ex &e) |
void | construct_from_exvector (const exvector &v) |
void | construct_from_epvector (const epvector &v, bool do_index_renaming=false) |
void | construct_from_epvector (epvector &&v, bool do_index_renaming=false) |
void | make_flat (const exvector &v) |
Combine this expairseq with argument exvector. More... | |
void | make_flat (const epvector &v, bool do_index_renaming=false) |
Combine this expairseq with argument epvector. More... | |
void | canonicalize () |
Brings this expairseq into a sorted (canonical) form. More... | |
void | combine_same_terms_sorted_seq () |
Compact a presorted expairseq by combining all matching expairs to one each. More... | |
bool | is_canonical () const |
Check if this expairseq is in sorted (canonical) form. More... | |
epvector | expandchildren (unsigned options) const |
Member-wise expand the expairs in this sequence. More... | |
epvector | evalchildren () const |
Member-wise evaluate the expairs in this sequence. More... | |
epvector | subschildren (const exmap &m, unsigned options=0) const |
Member-wise substitute in this sequence. More... | |
Protected Member Functions inherited from GiNaC::basic | |
basic () | |
virtual ex | eval_ncmul (const exvector &v) const |
virtual bool | match_same_type (const basic &other) const |
Returns true if the attributes of two objects are similar enough for a match. More... | |
virtual ex | derivative (const symbol &s) const |
Default implementation of ex::diff(). More... | |
virtual int | compare_same_type (const basic &other) const |
Returns order relation between two objects of same type. More... | |
virtual bool | is_equal_same_type (const basic &other) const |
Returns true if two objects of same type are equal. More... | |
virtual unsigned | calchash () const |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so. More... | |
void | ensure_if_modifiable () const |
Ensure the object may be modified without hurting others, throws if this is not the case. More... | |
void | do_print (const print_context &c, unsigned level) const |
Default output to stream. More... | |
void | do_print_tree (const print_tree &c, unsigned level) const |
Tree output to stream. More... | |
void | do_print_python_repr (const print_python_repr &c, unsigned level) const |
Python parsable output to stream. More... | |
Protected Attributes | |
epvector | seq |
ex | overall_coeff |
Protected Attributes inherited from GiNaC::basic | |
unsigned | flags |
of type status_flags More... | |
unsigned | hashvalue |
hash value More... | |
A sequence of class expair.
This is used for time-critical classes like sums and products of terms since handling a list of coeff and rest is much faster than handling a list of products or powers, respectively. (Not incidentally, Maple does it the same way, maybe others too.) The semantics is (at least) twofold: one for addition and one for multiplication and several methods have to be overridden by derived classes to reflect the change in semantics. However, most functionality turns out to be shared between addition and multiplication, which is the reason why there is this base class.
Definition at line 49 of file expairseq.h.
Definition at line 80 of file expairseq.cpp.
References construct_from_2_ex(), GINAC_ASSERT, and is_canonical().
Referenced by thisexpairseq().
GiNaC::expairseq::expairseq | ( | const exvector & | v | ) |
Definition at line 86 of file expairseq.cpp.
References construct_from_exvector(), GINAC_ASSERT, and is_canonical().
Definition at line 92 of file expairseq.cpp.
References construct_from_epvector(), GINAC_ASSERT, and is_canonical().
Definition at line 100 of file expairseq.cpp.
References construct_from_epvector(), GINAC_ASSERT, and is_canonical().
|
inlineoverridevirtual |
Return relative operator precedence (for parenthezing output).
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 62 of file expairseq.h.
Referenced by do_print(), and printpair().
|
overridevirtual |
Information about the object.
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 177 of file expairseq.cpp.
References GiNaC::basic::clearflag(), GiNaC::status_flags::expanded, GiNaC::info_flags::expanded, GiNaC::basic::flags, GiNaC::status_flags::has_indices, GiNaC::info_flags::has_indices, GiNaC::status_flags::has_no_indices, seq, and GiNaC::basic::setflag().
|
overridevirtual |
Number of operands/members.
Reimplemented from GiNaC::basic.
Definition at line 202 of file expairseq.cpp.
References default_overall_coeff(), GiNaC::ex::is_equal(), overall_coeff, and seq.
Referenced by GiNaC::algebraic_match_mul_with_mul(), GiNaC::mul::algebraic_subs_mul(), GiNaC::add::conjugate(), GiNaC::add::do_print_python_repr(), GiNaC::mul::do_print_python_repr(), do_print_tree(), GiNaC::power::expand_add(), GiNaC::power::expand_add_2(), GiNaC::add::get_free_indices(), GiNaC::mul::get_free_indices(), GiNaC::mul::has(), and match().
|
overridevirtual |
Return operand/member at position i.
Reimplemented from GiNaC::basic.
Definition at line 210 of file expairseq.cpp.
References default_overall_coeff(), GINAC_ASSERT, GiNaC::ex::is_equal(), overall_coeff, recombine_pair_to_ex(), and seq.
Referenced by GiNaC::algebraic_match_mul_with_mul(), GiNaC::mul::algebraic_subs_mul(), GiNaC::add::conjugate(), GiNaC::add::do_print_python_repr(), GiNaC::mul::do_print_python_repr(), GiNaC::add::get_free_indices(), GiNaC::mul::get_free_indices(), match(), GiNaC::add::series(), and GiNaC::mul::series().
|
overridevirtual |
Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively).
Reimplemented from GiNaC::basic.
Definition at line 218 of file expairseq.cpp.
References default_overall_coeff(), GiNaC::ex::is_equal(), overall_coeff, recombine_pair_to_ex(), seq, split_ex_to_pair(), and thisexpairseq().
|
overridevirtual |
Perform coefficient-wise automatic term rewriting rules in this class.
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 240 of file expairseq.cpp.
References evalchildren(), GiNaC::status_flags::evaluated, GiNaC::basic::flags, GiNaC::basic::hold(), and overall_coeff.
Implementation of ex::to_rational() for expairseqs.
Reimplemented from GiNaC::basic.
Definition at line 2735 of file normal.cpp.
References GiNaC::_ex1, default_overall_coeff(), GiNaC::ex::info(), GiNaC::info_flags::numeric, overall_coeff, recombine_pair_to_ex(), seq, split_ex_to_pair(), thisexpairseq(), GiNaC::ex::to_rational(), and to_rational().
Referenced by to_rational().
Implementation of ex::to_polynomial() for expairseqs.
Reimplemented from GiNaC::basic.
Definition at line 2751 of file normal.cpp.
References GiNaC::_ex1, default_overall_coeff(), GiNaC::ex::info(), GiNaC::info_flags::numeric, overall_coeff, recombine_pair_to_ex(), seq, split_ex_to_pair(), thisexpairseq(), GiNaC::ex::to_polynomial(), and to_polynomial().
Referenced by to_polynomial().
Check whether the expression matches a given pattern.
For every wildcard object in the pattern, a pair with the wildcard as a key and matching expression as a value is added to repl_lst.
Reimplemented from GiNaC::basic.
Definition at line 287 of file expairseq.cpp.
References GiNaC::ex::begin(), default_overall_coeff(), GiNaC::ex::is_equal(), GiNaC::match(), GiNaC::ex::nops(), nops(), GiNaC::ex::op(), op(), split_ex_to_pair(), and thisexpairseq().
Substitute a set of objects by arbitrary expressions.
The ex returned will already be evaluated.
Reimplemented from GiNaC::basic.
Definition at line 377 of file expairseq.cpp.
References GiNaC::subs_options::algebraic, m, GiNaC::subs_options::no_index_renaming, options, overall_coeff, GiNaC::basic::subs_one_level(), subschildren(), and thisexpairseq().
|
overridevirtual |
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 274 of file expairseq.cpp.
References GiNaC::are_ex_trivially_equal(), GiNaC::ex::conjugate(), GiNaC::conjugateepvector(), overall_coeff, seq, thisexpairseq(), and x.
|
overridevirtual |
Save (serialize) the object into archive node.
Archive the object.
Losely speaking, this method turns an expression into a byte stream (which can be saved and restored later on, or sent via network, etc.)
Reimplemented from GiNaC::basic.
Definition at line 132 of file expairseq.cpp.
References n, overall_coeff, and seq.
|
overridevirtual |
Load (deserialize) the object from an archive node.
Construct object from archive_node.
Reimplemented from GiNaC::basic.
Definition at line 112 of file expairseq.cpp.
References canonicalize(), GiNaC::basic::coeff(), GINAC_ASSERT, is_canonical(), n, overall_coeff, and seq.
|
overrideprotectedvirtual |
Returns true if two objects of same type are equal.
Normally needs not be reimplemented as long as it wasn't overwritten by some parent class, since it just calls compare_same_type(). The reason why this function exists is that sometimes it is easier to determine equality than an order relation and then it can be overridden.
Reimplemented from GiNaC::basic.
Definition at line 419 of file expairseq.cpp.
References GiNaC::ex::is_equal(), overall_coeff, and seq.
|
overrideprotectedvirtual |
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 441 of file expairseq.cpp.
References GiNaC::return_types::noncommutative_composite.
|
overrideprotectedvirtual |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so.
The method inherited from class basic computes a hash value based on the type and hash values of possible members. For this reason it is well suited for container classes but atomic classes should override this implementation because otherwise they would all end up with the same hashvalue.
Reimplemented from GiNaC::basic.
Definition at line 446 of file expairseq.cpp.
References GiNaC::status_flags::evaluated, GiNaC::basic::flags, GiNaC::ex::gethash(), GiNaC::status_flags::hash_calculated, GiNaC::basic::hashvalue, GiNaC::make_hash_seed(), overall_coeff, GiNaC::rotate_left(), seq, and GiNaC::basic::setflag().
|
overrideprotectedvirtual |
Expand expression, i.e.
multiply it out and return the result as a new expression.
Reimplemented from GiNaC::basic.
Reimplemented in GiNaC::mul.
Definition at line 466 of file expairseq.cpp.
References expandchildren(), GiNaC::status_flags::expanded, options, overall_coeff, GiNaC::basic::setflag(), and thisexpairseq().
|
protectedvirtual |
Create an object of this type.
This method works similar to a constructor. It is useful because expairseq has (at least) two possible different semantics but we want to inherit methods thus avoiding code duplication. Sometimes a method in expairseq has to create a new one of the same semantics, which cannot be done by a ctor because the name (add, mul,...) is unknown on the expairseq level. In order for this trick to work a derived class must of course override this definition.
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 489 of file expairseq.cpp.
References expairseq().
Referenced by conjugate(), expand(), map(), match(), subs(), to_polynomial(), and to_rational().
|
protectedvirtual |
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 494 of file expairseq.cpp.
References expairseq().
|
protectedvirtual |
Definition at line 508 of file expairseq.cpp.
References c, default_overall_coeff(), GiNaC::ex::is_equal(), overall_coeff, GiNaC::ex::print(), printpair(), and seq.
Referenced by do_print().
|
protectedvirtual |
Definition at line 499 of file expairseq.cpp.
References c, GiNaC::expair::coeff, precedence(), GiNaC::ex::print(), and GiNaC::expair::rest.
Referenced by is_canonical(), and printseq().
Form an expair from an ex, using the corresponding semantics.
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 532 of file expairseq.cpp.
References GiNaC::_ex1.
Referenced by construct_from_2_ex(), construct_from_expairseq_ex(), make_flat(), map(), match(), subschildren(), to_polynomial(), and to_rational().
|
protectedvirtual |
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 538 of file expairseq.cpp.
References c, and GINAC_ASSERT.
Referenced by evalchildren(), and subschildren().
|
protectedvirtual |
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 547 of file expairseq.cpp.
References c, GiNaC::expair::coeff, GINAC_ASSERT, and GiNaC::expair::rest.
Form an ex out of an expair, using the corresponding semantics.
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 559 of file expairseq.cpp.
References GiNaC::expair::coeff, and GiNaC::expair::rest.
Referenced by map(), op(), subschildren(), to_polynomial(), and to_rational().
|
protectedvirtual |
Reimplemented in GiNaC::mul.
Definition at line 564 of file expairseq.cpp.
References GiNaC::_ex1.
Referenced by combine_same_terms_sorted_seq(), construct_from_2_expairseq(), and construct_from_expairseq_ex().
|
protectedvirtual |
Reimplemented in GiNaC::mul.
Definition at line 574 of file expairseq.cpp.
References GiNaC::_ex0.
Referenced by do_print_tree(), map(), match(), nops(), op(), printseq(), to_polynomial(), and to_rational().
|
protectedvirtual |
Reimplemented in GiNaC::mul.
Definition at line 579 of file expairseq.cpp.
References c, GINAC_ASSERT, and overall_coeff.
Referenced by construct_from_2_ex(), construct_from_2_expairseq(), construct_from_expairseq_ex(), and make_flat().
Reimplemented in GiNaC::mul.
Definition at line 586 of file expairseq.cpp.
References GINAC_ASSERT, and overall_coeff.
|
protectedvirtual |
Reimplemented in GiNaC::mul.
Definition at line 595 of file expairseq.cpp.
|
protected |
Definition at line 149 of file expairseq.cpp.
References c, precedence(), and printseq().
|
protected |
Definition at line 156 of file expairseq.cpp.
References c, default_overall_coeff(), GiNaC::basic::flags, GiNaC::basic::hashvalue, GiNaC::ex::is_equal(), nops(), overall_coeff, GiNaC::ex::print(), and seq.
Definition at line 605 of file expairseq.cpp.
References GiNaC::expair::coeff, combine_overall_coeff(), GiNaC::ex::compare(), construct_from_2_expairseq(), construct_from_expairseq_ex(), GiNaC::info_flags::has_indices, GiNaC::ex::info(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::expair::rest, seq, and split_ex_to_pair().
Referenced by GiNaC::add::add(), expairseq(), and GiNaC::mul::mul().
|
protected |
Definition at line 667 of file expairseq.cpp.
References combine_overall_coeff(), construct_from_epvector(), expair_needs_further_processing(), GiNaC::numeric::is_zero(), overall_coeff, and seq.
Referenced by construct_from_2_ex().
Definition at line 720 of file expairseq.cpp.
References GiNaC::expair::coeff, combine_overall_coeff(), construct_from_epvector(), expair_needs_further_processing(), GiNaC::numeric::is_zero(), last, overall_coeff, GiNaC::expair::rest, seq, and split_ex_to_pair().
Referenced by construct_from_2_ex().
|
protected |
Definition at line 781 of file expairseq.cpp.
References canonicalize(), combine_same_terms_sorted_seq(), and make_flat().
Referenced by GiNaC::add::add(), expairseq(), and GiNaC::mul::mul().
|
protected |
Definition at line 793 of file expairseq.cpp.
References canonicalize(), combine_same_terms_sorted_seq(), and make_flat().
Referenced by GiNaC::add::add(), combine_same_terms_sorted_seq(), construct_from_2_expairseq(), construct_from_expairseq_ex(), expairseq(), and GiNaC::mul::mul().
|
protected |
Definition at line 805 of file expairseq.cpp.
References canonicalize(), combine_same_terms_sorted_seq(), and make_flat().
|
protected |
Combine this expairseq with argument exvector.
It cares for associativity as well as for special handling of numerics.
Definition at line 819 of file expairseq.cpp.
References GiNaC::_ex1, combine_overall_coeff(), GiNaC::make_flat_inserter::handle_factor(), GiNaC::info_flags::has_indices, overall_coeff, seq, and split_ex_to_pair().
Referenced by construct_from_epvector(), and construct_from_exvector().
|
protected |
Combine this expairseq with argument epvector.
It cares for associativity as well as for special handling of numerics.
Definition at line 864 of file expairseq.cpp.
References GiNaC::_ex1, GiNaC::are_ex_trivially_equal(), GiNaC::ex::coeff(), combine_overall_coeff(), GiNaC::make_flat_inserter::handle_factor(), GiNaC::info_flags::has_indices, overall_coeff, and seq.
|
protected |
Brings this expairseq into a sorted (canonical) form.
Definition at line 915 of file expairseq.cpp.
References seq.
Referenced by construct_from_epvector(), construct_from_exvector(), and read_archive().
|
protected |
Compact a presorted expairseq by combining all matching expairs to one each.
On an add object, this is responsible for 2*x+3*x+y -> 5*x+y, for instance.
Definition at line 924 of file expairseq.cpp.
References construct_from_epvector(), expair_needs_further_processing(), last, and seq.
Referenced by construct_from_epvector(), and construct_from_exvector().
|
protected |
Check if this expairseq is in sorted (canonical) form.
Useful mainly for debugging or in assertions since being sorted is an invariance.
Definition at line 972 of file expairseq.cpp.
References printpair(), and seq.
Referenced by GiNaC::add::add(), expairseq(), GiNaC::mul::mul(), and read_archive().
|
protected |
Member-wise expand the expairs in this sequence.
Definition at line 1009 of file expairseq.cpp.
References GiNaC::are_ex_trivially_equal(), GiNaC::ex::coeff(), GiNaC::ex::expand(), last, options, and seq.
Referenced by GiNaC::add::expand(), and expand().
|
protected |
Member-wise evaluate the expairs in this sequence.
Definition at line 1047 of file expairseq.cpp.
References combine_ex_with_coeff_to_pair(), GiNaC::expair::is_equal(), last, seq, and unlikely.
Referenced by GiNaC::add::eval(), eval(), and GiNaC::mul::eval().
Member-wise substitute in this sequence.
Definition at line 1084 of file expairseq.cpp.
References GiNaC::are_ex_trivially_equal(), GiNaC::ex::coeff(), combine_ex_with_coeff_to_pair(), GiNaC::expair::is_equal(), last, m, options, GiNaC::subs_options::pattern_is_not_product, GiNaC::subs_options::pattern_is_product, recombine_pair_to_ex(), seq, split_ex_to_pair(), and GiNaC::ex::subs().
Referenced by subs().
|
protected |
Definition at line 127 of file expairseq.h.
Referenced by archive(), calchash(), GiNaC::mul::can_be_further_expanded(), canonicalize(), GiNaC::add::coeff(), GiNaC::mul::coeff(), combine_same_terms_sorted_seq(), conjugate(), GiNaC::mul::conjugate(), construct_from_2_ex(), construct_from_2_expairseq(), construct_from_expairseq_ex(), GiNaC::add::degree(), GiNaC::mul::degree(), GiNaC::add::derivative(), GiNaC::mul::derivative(), GiNaC::mul::do_print(), GiNaC::add::do_print_csrc(), GiNaC::mul::do_print_csrc(), GiNaC::mul::do_print_latex(), do_print_tree(), GiNaC::add::eval(), GiNaC::mul::eval(), GiNaC::power::eval(), GiNaC::add::eval_ncmul(), GiNaC::mul::eval_ncmul(), evalchildren(), GiNaC::mul::evalf(), GiNaC::add::evalm(), GiNaC::mul::evalm(), GiNaC::mul::expand(), GiNaC::power::expand(), GiNaC::power::expand_add(), GiNaC::power::expand_add_2(), expandchildren(), GiNaC::mul::expandchildren(), GiNaC::mul::find_real_imag(), GiNaC::add::imag_part(), GiNaC::add::info(), info(), GiNaC::mul::info(), GiNaC::add::integer_content(), GiNaC::mul::integer_content(), is_canonical(), is_equal_same_type(), GiNaC::add::is_polynomial(), GiNaC::mul::is_polynomial(), GiNaC::add::ldegree(), GiNaC::mul::ldegree(), make_flat(), map(), GiNaC::add::max_coefficient(), GiNaC::mul::max_coefficient(), nops(), GiNaC::add::normal(), GiNaC::mul::normal(), op(), GiNaC::add::print_add(), printseq(), read_archive(), GiNaC::add::real_part(), GiNaC::add::return_type(), GiNaC::mul::return_type(), GiNaC::add::return_type_tinfo(), GiNaC::mul::return_type_tinfo(), GiNaC::add::series(), GiNaC::mul::series(), GiNaC::add::smod(), GiNaC::mul::smod(), subschildren(), to_polynomial(), and to_rational().
|
protected |
Definition at line 128 of file expairseq.h.
Referenced by GiNaC::add::add(), archive(), calchash(), GiNaC::add::coeff(), GiNaC::mul::coeff(), GiNaC::add::combine_ex_with_coeff_to_pair(), combine_overall_coeff(), GiNaC::mul::combine_overall_coeff(), conjugate(), GiNaC::mul::conjugate(), construct_from_2_expairseq(), construct_from_expairseq_ex(), GiNaC::add::degree(), GiNaC::mul::derivative(), GiNaC::add::do_print_csrc(), GiNaC::mul::do_print_csrc(), do_print_tree(), GiNaC::add::eval(), eval(), GiNaC::mul::eval(), GiNaC::power::eval(), GiNaC::mul::evalf(), GiNaC::add::evalm(), GiNaC::mul::evalm(), GiNaC::add::expand(), expand(), GiNaC::mul::expand(), GiNaC::power::expand(), GiNaC::power::expand_add(), GiNaC::power::expand_add_2(), GiNaC::mul::find_real_imag(), GiNaC::add::imag_part(), GiNaC::add::info(), GiNaC::mul::info(), GiNaC::add::integer_content(), GiNaC::mul::integer_content(), is_equal_same_type(), GiNaC::add::ldegree(), make_flat(), map(), GiNaC::add::max_coefficient(), GiNaC::mul::max_coefficient(), GiNaC::mul::mul(), nops(), GiNaC::add::normal(), GiNaC::mul::normal(), op(), GiNaC::add::print_add(), GiNaC::mul::print_overall_coeff(), printseq(), read_archive(), GiNaC::add::real_part(), GiNaC::add::series(), GiNaC::mul::series(), GiNaC::add::smod(), GiNaC::mul::smod(), GiNaC::add::split_ex_to_pair(), subs(), to_polynomial(), and to_rational().