|
GiNaC 1.8.10
|
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). | |
| bool | info (unsigned inf) const override |
| Information about the object. | |
| size_t | nops () const override |
| Number of operands/members. | |
| ex | op (size_t i) const override |
| Return operand/member at position i. | |
| ex | map (map_function &f) const override |
| Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively). | |
| ex | eval () const override |
| Perform coefficient-wise automatic term rewriting rules in this class. | |
| ex | to_rational (exmap &repl) const override |
| Implementation of ex::to_rational() for expairseqs. | |
| ex | to_polynomial (exmap &repl) const override |
| Implementation of ex::to_polynomial() for expairseqs. | |
| bool | match (const ex &pattern, exmap &repl_lst) const override |
| Check whether the expression matches a given pattern. | |
| ex | subs (const exmap &m, unsigned options=0) const override |
| Substitute a set of objects by arbitrary expressions. | |
| ex | conjugate () const override |
| void | archive (archive_node &n) const override |
| Save (serialize) the object into archive node. | |
| void | read_archive (const archive_node &n, lst &syms) override |
| Load (deserialize) the object from an archive node. | |
Public Member Functions inherited from GiNaC::basic | |
| virtual | ~basic () |
| basic destructor, virtual because class ex will delete objects of derived classes via a basic*. | |
| basic (const basic &other) | |
| const basic & | operator= (const basic &other) |
| basic assignment operator: the other object might be of a derived class. | |
| virtual basic * | duplicate () const |
| Create a clone of this object on the heap. | |
| virtual ex | evalf () const |
| Evaluate object numerically. | |
| virtual ex | evalm () const |
| Evaluate sums, products and integer powers of matrices. | |
| virtual ex | eval_integ () const |
| Evaluate integrals, if result is known. | |
| virtual ex | eval_indexed (const basic &i) const |
| Perform automatic symbolic evaluations on indexed expression that contains this object as the base expression. | |
| virtual void | print (const print_context &c, unsigned level=0) const |
| Output to stream. | |
| virtual void | dbgprint () const |
| Little wrapper around print to be called within a debugger. | |
| virtual void | dbgprinttree () const |
| Little wrapper around printtree to be called within a debugger. | |
| 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. | |
| 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. | |
| 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. | |
| virtual int | degree (const ex &s) const |
| Return degree of highest power in object s. | |
| virtual int | ldegree (const ex &s) const |
| Return degree of lowest power in object s. | |
| virtual ex | coeff (const ex &s, int n=1) const |
| Return coefficient of degree n in object s. | |
| virtual ex | collect (const ex &s, bool distributed=false) const |
| Sort expanded expression in terms of powers of some object(s). | |
| virtual ex | series (const relational &r, int order, unsigned options=0) const |
| Default implementation of ex::series(). | |
| virtual ex | normal (exmap &repl, exmap &rev_lookup, lst &modifier) const |
| Default implementation of ex::normal(). | |
| virtual numeric | integer_content () const |
| virtual ex | smod (const numeric &xi) const |
| Apply symmetric modular homomorphism to an expanded multivariate polynomial. | |
| virtual numeric | max_coefficient () const |
| Implementation ex::max_coefficient(). | |
| virtual exvector | get_free_indices () const |
| Return a vector containing the free indices of an expression. | |
| virtual ex | add_indexed (const ex &self, const ex &other) const |
| Add two indexed expressions. | |
| virtual ex | scalar_mul_indexed (const ex &self, const numeric &other) const |
| Multiply an indexed expression with a scalar. | |
| 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. | |
| virtual return_type_t | return_type_tinfo () 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. | |
| void | print_dispatch (const registered_class_info &ri, const print_context &c, unsigned level) const |
| Like print(), but dispatch to the specified class. | |
| ex | subs_one_level (const exmap &m, unsigned options) const |
| Helper function for subs(). | |
| ex | diff (const symbol &s, unsigned nth=1) const |
| Default interface of nth derivative ex::diff(s, n). | |
| int | compare (const basic &other) const |
| Compare objects syntactically to establish canonical ordering. | |
| bool | is_equal (const basic &other) const |
| Test for syntactic equality. | |
| const basic & | hold () const |
| Stop further evaluation. | |
| unsigned | gethash () const |
| const basic & | setflag (unsigned f) const |
| Set some status_flags. | |
| const basic & | clearflag (unsigned f) const |
| Clear some status_flags. | |
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. | |
| 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. | |
| ex | expand (unsigned options=0) const override |
| Expand expression, i.e. | |
| virtual ex | thisexpairseq (const epvector &v, const ex &oc, bool do_index_renaming=false) const |
| Create an object of this type. | |
| 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. | |
| 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. | |
| 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. | |
| void | make_flat (const epvector &v, bool do_index_renaming=false) |
| Combine this expairseq with argument epvector. | |
| void | canonicalize () |
| Brings this expairseq into a sorted (canonical) form. | |
| void | combine_same_terms_sorted_seq () |
| Compact a presorted expairseq by combining all matching expairs to one each. | |
| bool | is_canonical () const |
| Check if this expairseq is in sorted (canonical) form. | |
| epvector | expandchildren (unsigned options) const |
| Member-wise expand the expairs in this sequence. | |
| epvector | evalchildren () const |
| Member-wise evaluate the expairs in this sequence. | |
| epvector | subschildren (const exmap &m, unsigned options=0) const |
| Member-wise substitute in this sequence. | |
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. | |
| virtual ex | derivative (const symbol &s) const |
| Default implementation of ex::diff(). | |
| virtual int | compare_same_type (const basic &other) const |
| Returns order relation between two objects of same type. | |
| void | ensure_if_modifiable () const |
| Ensure the object may be modified without hurting others, throws if this is not the case. | |
| void | do_print (const print_context &c, unsigned level) const |
| Default output to stream. | |
| void | do_print_tree (const print_tree &c, unsigned level) const |
| Tree output to stream. | |
| void | do_print_python_repr (const print_python_repr &c, unsigned level) const |
| Python parsable output to stream. | |
Protected Attributes | |
| epvector | seq |
| ex | overall_coeff |
Protected Attributes inherited from GiNaC::basic | |
| unsigned | flags |
| of type status_flags | |
| unsigned | hashvalue |
| hash value | |
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 48 of file expairseq.h.
Definition at line 79 of file expairseq.cpp.
References construct_from_2_ex(), GINAC_ASSERT, and is_canonical().
| GiNaC::expairseq::expairseq | ( | const exvector & | v | ) |
Definition at line 85 of file expairseq.cpp.
References construct_from_exvector(), GINAC_ASSERT, and is_canonical().
Definition at line 91 of file expairseq.cpp.
References construct_from_epvector(), GINAC_ASSERT, and is_canonical().
Definition at line 99 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 61 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 176 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 201 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 209 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 217 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 239 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 2734 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 2750 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 286 of file expairseq.cpp.
References GiNaC::ex::begin(), default_overall_coeff(), GiNaC::ex::is_equal(), 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 376 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 273 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 131 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 111 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 418 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 440 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 445 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 465 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 488 of file expairseq.cpp.
Referenced by conjugate(), expand(), map(), match(), subs(), to_polynomial(), and to_rational().
|
protectedvirtual |
Reimplemented in GiNaC::add, and GiNaC::mul.
Definition at line 493 of file expairseq.cpp.
|
protectedvirtual |
Definition at line 507 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 498 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 531 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 537 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 546 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 558 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 563 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 573 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 578 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(), make_flat(), and make_flat().
Reimplemented in GiNaC::mul.
Definition at line 585 of file expairseq.cpp.
References GINAC_ASSERT, and overall_coeff.
|
protectedvirtual |
Reimplemented in GiNaC::mul.
Definition at line 594 of file expairseq.cpp.
Referenced by make_flat().
|
protected |
Definition at line 148 of file expairseq.cpp.
References c, precedence(), and printseq().
|
protected |
Definition at line 155 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 604 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 666 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 719 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 780 of file expairseq.cpp.
References canonicalize(), combine_same_terms_sorted_seq(), and make_flat().
Referenced by GiNaC::add::add(), expairseq(), GiNaC::mul::mul(), and GiNaC::mul::mul().
|
protected |
Definition at line 792 of file expairseq.cpp.
References canonicalize(), combine_same_terms_sorted_seq(), and make_flat().
Referenced by GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), combine_same_terms_sorted_seq(), construct_from_2_expairseq(), construct_from_expairseq_ex(), expairseq(), expairseq(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), and GiNaC::mul::mul().
|
protected |
Definition at line 804 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 818 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(), 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 863 of file expairseq.cpp.
References GiNaC::_ex1, GiNaC::are_ex_trivially_equal(), can_make_flat(), 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 914 of file expairseq.cpp.
References seq.
Referenced by construct_from_epvector(), 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 923 of file expairseq.cpp.
References construct_from_epvector(), expair_needs_further_processing(), last, and seq.
Referenced by construct_from_epvector(), 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 971 of file expairseq.cpp.
References printpair(), and seq.
Referenced by GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), expairseq(), expairseq(), expairseq(), expairseq(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), and read_archive().
|
protected |
Member-wise expand the expairs in this sequence.
Definition at line 1008 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 1046 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 1083 of file expairseq.cpp.
References GiNaC::are_ex_trivially_equal(), GiNaC::ex::begin(), 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 126 of file expairseq.h.
Referenced by archive(), calchash(), 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(), 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 127 of file expairseq.h.
Referenced by GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), GiNaC::add::add(), 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(), 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(), make_flat(), map(), GiNaC::add::max_coefficient(), GiNaC::mul::max_coefficient(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), GiNaC::mul::mul(), 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().