GiNaC 1.8.8
|
Lightweight wrapper for GiNaC's symbolic objects. More...
#include <ex.h>
Public Member Functions | |
ex () noexcept | |
ex (const basic &other) | |
ex (int i) | |
ex (unsigned int i) | |
ex (long i) | |
ex (unsigned long i) | |
ex (long long i) | |
ex (unsigned long long i) | |
ex (double const d) | |
ex (const std::string &s, const ex &l) | |
Construct ex from string and a list of symbols. | |
void | swap (ex &other) noexcept |
Efficiently swap the contents of two expressions. | |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
const_preorder_iterator | preorder_begin () const |
const_preorder_iterator | preorder_end () const noexcept |
const_postorder_iterator | postorder_begin () const |
const_postorder_iterator | postorder_end () const noexcept |
ex | eval () const |
ex | evalf () const |
ex | evalm () const |
ex | eval_ncmul (const exvector &v) const |
ex | eval_integ () const |
void | print (const print_context &c, unsigned level=0) const |
Print expression to stream. | |
void | dbgprint () const |
Little wrapper arount print to be called within a debugger. | |
void | dbgprinttree () const |
Little wrapper arount printtree to be called within a debugger. | |
bool | info (unsigned inf) const |
size_t | nops () const |
ex | op (size_t i) const |
ex | operator[] (const ex &index) const |
ex | operator[] (size_t i) const |
ex & | let_op (size_t i) |
Return modifiable operand/member at position i. | |
ex & | operator[] (const ex &index) |
ex & | operator[] (size_t i) |
ex | lhs () const |
Left hand side of relational expression. | |
ex | rhs () const |
Right hand side of relational expression. | |
ex | conjugate () const |
ex | real_part () const |
ex | imag_part () const |
bool | has (const ex &pattern, unsigned options=0) const |
bool | find (const ex &pattern, exset &found) const |
Find all occurrences of a pattern. | |
bool | match (const ex &pattern) const |
Check whether expression matches a specified pattern. | |
bool | match (const ex &pattern, exmap &repls) const |
ex | subs (const exmap &m, unsigned options=0) const |
ex | subs (const lst &ls, const lst &lr, unsigned options=0) const |
Substitute objects in an expression (syntactic substitution) and return the result as a new expression. | |
ex | subs (const ex &e, unsigned options=0) const |
Substitute objects in an expression (syntactic substitution) and return the result as a new expression. | |
ex | map (map_function &f) const |
ex | map (ex(*f)(const ex &e)) const |
void | accept (visitor &v) const |
void | traverse_preorder (visitor &v) const |
Traverse expression tree with given visitor, preorder traversal. | |
void | traverse_postorder (visitor &v) const |
Traverse expression tree with given visitor, postorder traversal. | |
void | traverse (visitor &v) const |
bool | is_polynomial (const ex &vars) const |
Check whether expression is a polynomial. | |
int | degree (const ex &s) const |
int | ldegree (const ex &s) const |
ex | coeff (const ex &s, int n=1) const |
ex | lcoeff (const ex &s) const |
ex | tcoeff (const ex &s) const |
ex | expand (unsigned options=0) const |
Expand an expression. | |
ex | collect (const ex &s, bool distributed=false) const |
ex | diff (const symbol &s, unsigned nth=1) const |
Compute partial derivative of an expression. | |
ex | series (const ex &r, int order, unsigned options=0) const |
Compute the truncated series expansion of an expression. | |
ex | normal () const |
Normalization of rational functions. | |
ex | to_rational (exmap &repl) const |
Rationalization of non-rational functions. | |
ex | to_polynomial (exmap &repl) const |
ex | numer () const |
Get numerator of an expression. | |
ex | denom () const |
Get denominator of an expression. | |
ex | numer_denom () const |
Get numerator and denominator of an expression. | |
ex | unit (const ex &x) const |
Compute unit part (= sign of leading coefficient) of a multivariate polynomial in Q[x]. | |
ex | content (const ex &x) const |
Compute content part (= unit normal GCD of all coefficients) of a multivariate polynomial in Q[x]. | |
numeric | integer_content () const |
Compute the integer content (= GCD of all numeric coefficients) of an expanded polynomial. | |
ex | primpart (const ex &x) const |
Compute primitive part of a multivariate polynomial in Q[x]. | |
ex | primpart (const ex &x, const ex &cont) const |
Compute primitive part of a multivariate polynomial in Q[x] when the content part is already known. | |
void | unitcontprim (const ex &x, ex &u, ex &c, ex &p) const |
Compute unit part, content part, and primitive part of a multivariate polynomial in Q[x]. | |
ex | smod (const numeric &xi) const |
numeric | max_coefficient () const |
Return maximum (absolute value) coefficient of a polynomial. | |
exvector | get_free_indices () const |
ex | simplify_indexed (unsigned options=0) const |
Simplify/canonicalize expression containing indexed objects. | |
ex | simplify_indexed (const scalar_products &sp, unsigned options=0) const |
Simplify/canonicalize expression containing indexed objects. | |
int | compare (const ex &other) const |
bool | is_equal (const ex &other) const |
bool | is_zero () const |
bool | is_zero_matrix () const |
Check whether expression is zero or zero matrix. | |
ex | symmetrize () const |
Symmetrize expression over its free indices. | |
ex | symmetrize (const lst &l) const |
Symmetrize expression over a list of objects (symbols, indices). | |
ex | antisymmetrize () const |
Antisymmetrize expression over its free indices. | |
ex | antisymmetrize (const lst &l) const |
Antisymmetrize expression over a list of objects (symbols, indices). | |
ex | symmetrize_cyclic () const |
Symmetrize expression by cyclic permutation over its free indices. | |
ex | symmetrize_cyclic (const lst &l) const |
Symmetrize expression by cyclic permutation over a list of objects (symbols, indices). | |
unsigned | return_type () const |
return_type_t | return_type_tinfo () const |
unsigned | gethash () const |
Private Member Functions | |
void | makewriteable () |
Make this ex writable (if more than one ex handle the same basic) by unlinking the object and creating an unshared copy of it. | |
void | share (const ex &other) const |
Share equal objects between expressions. | |
Static Private Member Functions | |
static ptr< basic > | construct_from_basic (const basic &other) |
Helper function for the ex-from-basic constructor. | |
static basic & | construct_from_int (int i) |
static basic & | construct_from_uint (unsigned int i) |
static basic & | construct_from_long (long i) |
static basic & | construct_from_ulong (unsigned long i) |
static basic & | construct_from_longlong (long long i) |
static basic & | construct_from_ulonglong (unsigned long long i) |
static basic & | construct_from_double (double d) |
static ptr< basic > | construct_from_string_and_lst (const std::string &s, const ex &l) |
Private Attributes | |
ptr< basic > | bp |
pointer to basic object managed by this | |
Friends | |
class | archive_node |
bool | are_ex_trivially_equal (const ex &, const ex &) |
Compare two objects of class quickly without doing a deep tree traversal. | |
template<class T > | |
const T & | ex_to (const ex &) |
Return a reference to the basic-derived class T object embedded in an expression. | |
template<class T > | |
bool | is_a (const ex &) |
Check if ex is a handle to a T, including base classes. | |
template<class T > | |
bool | is_exactly_a (const ex &) |
Check if ex is a handle to a T, not including base classes. | |
Lightweight wrapper for GiNaC's symbolic objects.
It holds a pointer to the other object in order to do garbage collection by the method of reference counting. I.e., it is a smart pointer. Also, the constructor ex::ex(const basic & other) calls the methods that do automatic evaluation. E.g., x-x turns automatically into 0.
|
inlinenoexcept |
Definition at line 263 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 269 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 275 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 281 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 287 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 293 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 299 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 305 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Definition at line 311 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inline |
Construct ex from string and a list of symbols.
The input grammar is similar to the GiNaC output format. All symbols and indices to be used in the expression must be specified in a lst in the second argument. Undefined symbols and other parser errors will throw an exception.
Definition at line 317 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
|
inlinenoexcept |
Efficiently swap the contents of two expressions.
Definition at line 105 of file ex.h.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
Referenced by GiNaC::ncmul::derivative(), GiNaC::ex_swap::operator()(), GiNaC::swap(), GiNaC::expair::swap(), and std::swap().
|
inlinenoexcept |
Definition at line 663 of file ex.h.
Referenced by GiNaC::abs_expand(), GiNaC::antisymmetrize(), GiNaC::mul::derivative(), GiNaC::divide_in_z(), GiNaC::function::eval_ncmul(), GiNaC::ncmul::evalm(), GiNaC::exp_expand(), GiNaC::mul::expandchildren(), GiNaC::G3_eval(), GiNaC::G3_evalf(), GiNaC::H_deriv(), GiNaC::H_eval(), GiNaC::H_print_latex(), GiNaC::Li_eval(), GiNaC::Li_evalf(), GiNaC::Li_print_latex(), GiNaC::log_expand(), GiNaC::expairseq::match(), GiNaC::archive_node::printraw(), GiNaC::archive::printraw(), GiNaC::rename_dummy_indices(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::expairseq::subschildren(), GiNaC::symmetrize(), GiNaC::symmetrize_cyclic(), and GiNaC::zeta2_print_latex().
|
inlinenoexcept |
Definition at line 668 of file ex.h.
References nops().
Referenced by GiNaC::abs_expand(), GiNaC::mul::evalm(), GiNaC::exp_expand(), GiNaC::G3_eval(), GiNaC::G3_evalf(), GiNaC::Li_print_latex(), GiNaC::log_expand(), and GiNaC::rename_dummy_indices_uniquely().
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
Definition at line 122 of file ex.h.
Referenced by GiNaC::adaptivesimpson(), GiNaC::EllipticE_evalf(), GiNaC::EllipticK_evalf(), evalf(), GiNaC::constant::evalf(), GiNaC::integral::evalf(), GiNaC::mul::evalf(), GiNaC::power::evalf(), GiNaC::evalf(), GiNaC::evalf(), GiNaC::fsolve(), GiNaC::Kronecker_dtau_kernel::get_numerical_value(), GiNaC::integration_kernel::get_numerical_value_impl(), GiNaC::H_eval(), GiNaC::H_evalf(), GiNaC::multiple_polylog_kernel::is_numeric(), GiNaC::ELi_kernel::is_numeric(), GiNaC::Ebar_kernel::is_numeric(), GiNaC::Kronecker_dtau_kernel::is_numeric(), GiNaC::Kronecker_dz_kernel::is_numeric(), GiNaC::Eisenstein_kernel::is_numeric(), GiNaC::Eisenstein_h_kernel::is_numeric(), GiNaC::modular_form_kernel::is_numeric(), GiNaC::user_defined_kernel::is_numeric(), GiNaC::iterated_integral_evalf_impl(), GiNaC::Li_evalf(), GiNaC::S_evalf(), GiNaC::integration_kernel::series_coeff(), GiNaC::multiple_polylog_kernel::series_coeff_impl(), GiNaC::ELi_kernel::series_coeff_impl(), GiNaC::Ebar_kernel::series_coeff_impl(), GiNaC::Kronecker_dtau_kernel::series_coeff_impl(), GiNaC::Kronecker_dz_kernel::series_coeff_impl(), and GiNaC::subsvalue().
|
inline |
Definition at line 123 of file ex.h.
Referenced by evalm(), GiNaC::add::evalm(), GiNaC::mul::evalm(), GiNaC::power::evalm(), GiNaC::pseries::evalm(), GiNaC::evalm(), and is_zero_matrix().
Definition at line 124 of file ex.h.
References bp, and eval_ncmul().
Referenced by eval_ncmul(), GiNaC::integral::eval_ncmul(), and GiNaC::relational::eval_ncmul().
|
inline |
Definition at line 125 of file ex.h.
References bp, and eval_integ().
Referenced by eval_integ(), GiNaC::integral::eval_integ(), GiNaC::pseries::eval_integ(), and GiNaC::eval_integ().
void GiNaC::ex::print | ( | const print_context & | c, |
unsigned | level = 0 |
||
) | const |
Print expression to stream.
The formatting of the output is determined by the kind of print_context object that is passed. Possible formattings include ginsh-parsable output (the default), tree-like output for debugging, and C++ source.
Definition at line 55 of file ex.cpp.
Referenced by GiNaC::abs_print_csrc_float(), GiNaC::abs_print_latex(), GiNaC::conjugate_print_latex(), GiNaC::integral::do_print(), GiNaC::multiple_polylog_kernel::do_print(), GiNaC::ELi_kernel::do_print(), GiNaC::Ebar_kernel::do_print(), GiNaC::Kronecker_dtau_kernel::do_print(), GiNaC::Kronecker_dz_kernel::do_print(), GiNaC::Eisenstein_kernel::do_print(), GiNaC::Eisenstein_h_kernel::do_print(), GiNaC::modular_form_kernel::do_print(), GiNaC::user_defined_kernel::do_print(), GiNaC::mul::do_print(), GiNaC::relational::do_print(), GiNaC::add::do_print_csrc(), GiNaC::idx::do_print_csrc(), GiNaC::mul::do_print_csrc(), GiNaC::power::do_print_csrc(), GiNaC::power::do_print_csrc_cl_N(), GiNaC::power::do_print_dflt(), GiNaC::integral::do_print_latex(), GiNaC::mul::do_print_latex(), GiNaC::power::do_print_latex(), GiNaC::add::do_print_python_repr(), GiNaC::mul::do_print_python_repr(), GiNaC::power::do_print_python_repr(), GiNaC::pseries::do_print_python_repr(), GiNaC::relational::do_print_python_repr(), GiNaC::basic::do_print_tree(), GiNaC::clifford::do_print_tree(), GiNaC::expairseq::do_print_tree(), GiNaC::idx::do_print_tree(), GiNaC::varidx::do_print_tree(), GiNaC::spinidx::do_print_tree(), GiNaC::indexed::do_print_tree(), GiNaC::pseries::do_print_tree(), GiNaC::factorial_print_dflt_latex(), GiNaC::H_print_latex(), GiNaC::imag_part_print_latex(), GiNaC::operator<<(), GiNaC::expair::print(), GiNaC::add::print_add(), GiNaC::idx::print_index(), GiNaC::mul::print_overall_coeff(), GiNaC::power::print_power(), GiNaC::pseries::print_series(), GiNaC::print_sym_pow(), GiNaC::expairseq::printpair(), GiNaC::expairseq::printseq(), GiNaC::real_part_print_latex(), GiNaC::S_print_latex(), and GiNaC::zeta1_print_latex().
void GiNaC::ex::dbgprint | ( | ) | const |
void GiNaC::ex::dbgprinttree | ( | ) | const |
|
inline |
Definition at line 133 of file ex.h.
References bp.
Referenced by GiNaC::abs_eval(), GiNaC::abs_info(), GiNaC::abs_power(), GiNaC::acos_eval(), GiNaC::acosh_eval(), GiNaC::asin_eval(), GiNaC::asin_info(), GiNaC::asinh_conjugate(), GiNaC::asinh_eval(), GiNaC::atan2_eval(), GiNaC::atan2_info(), GiNaC::atan_conjugate(), GiNaC::atan_eval(), GiNaC::atan_info(), GiNaC::atanh_eval(), GiNaC::beta_eval(), GiNaC::beta_series(), GiNaC::mul::can_be_further_expanded(), GiNaC::mul::can_make_flat(), GiNaC::power::conjugate(), GiNaC::pseries::conjugate(), GiNaC::expairseq::construct_from_2_ex(), content(), GiNaC::cos_eval(), GiNaC::cosh_eval(), GiNaC::csgn_series(), GiNaC::matrix::determinant(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::add::do_print_csrc(), GiNaC::idx::do_print_csrc(), GiNaC::power::do_print_csrc(), GiNaC::eta_eval(), GiNaC::eta_evalf(), GiNaC::eta_series(), GiNaC::power::eval(), GiNaC::exp_eval(), GiNaC::exp_info(), GiNaC::exp_power(), GiNaC::power::expand(), GiNaC::find_common_factor(), GiNaC::func_arg_info(), GiNaC::G2_eval(), GiNaC::G2_evalf(), GiNaC::G3_eval(), GiNaC::G3_evalf(), GiNaC::gcd(), GiNaC::H_eval(), GiNaC::H_evalf(), GiNaC::power::has(), GiNaC::heur_gcd(), GiNaC::idx::idx(), GiNaC::power::imag_part(), GiNaC::pseries::imag_part(), GiNaC::add::info(), GiNaC::mul::info(), GiNaC::power::info(), GiNaC::multiple_polylog_kernel::is_numeric(), GiNaC::ELi_kernel::is_numeric(), GiNaC::Ebar_kernel::is_numeric(), GiNaC::Kronecker_dtau_kernel::is_numeric(), GiNaC::Kronecker_dz_kernel::is_numeric(), GiNaC::Eisenstein_kernel::is_numeric(), GiNaC::Eisenstein_h_kernel::is_numeric(), GiNaC::modular_form_kernel::is_numeric(), GiNaC::user_defined_kernel::is_numeric(), GiNaC::power::is_polynomial(), GiNaC::iterated_integral2_eval(), GiNaC::iterated_integral3_eval(), GiNaC::iterated_integral_evalf_impl(), GiNaC::lcm(), GiNaC::lcmcoeff(), GiNaC::lgamma_conjugate(), GiNaC::lgamma_eval(), GiNaC::lgamma_series(), GiNaC::Li2_conjugate(), GiNaC::Li2_eval(), GiNaC::Li2_series(), GiNaC::Li_eval(), GiNaC::Li_evalf(), GiNaC::Li_series(), GiNaC::log_conjugate(), GiNaC::log_eval(), GiNaC::log_expand(), GiNaC::log_imag_part(), GiNaC::log_info(), GiNaC::log_real_part(), GiNaC::log_series(), GiNaC::lsolve(), GiNaC::basic::normal(), GiNaC::power::normal(), GiNaC::relational::operator safe_bool(), GiNaC::Order_imag_part(), GiNaC::Order_power(), GiNaC::matrix::pow(), GiNaC::prem(), GiNaC::psi1_eval(), GiNaC::psi1_series(), GiNaC::psi2_eval(), GiNaC::psi2_series(), GiNaC::quo(), GiNaC::power::real_part(), GiNaC::pseries::real_part(), GiNaC::rem(), GiNaC::resultant(), GiNaC::S_eval(), GiNaC::S_evalf(), GiNaC::S_series(), GiNaC::mul::series(), GiNaC::power::series(), GiNaC::sin_eval(), GiNaC::sinh_eval(), GiNaC::sprem(), GiNaC::step_series(), subs(), GiNaC::tan_eval(), GiNaC::tanh_eval(), GiNaC::tgamma_eval(), GiNaC::tgamma_series(), GiNaC::expairseq::to_polynomial(), GiNaC::power::to_polynomial(), GiNaC::expairseq::to_rational(), GiNaC::power::to_rational(), GiNaC::matrix::trace(), GiNaC::trig_info(), GiNaC::tryfactsubs(), unit(), unitcontprim(), GiNaC::zeta2_deriv(), and GiNaC::zeta2_eval().
|
inline |
Definition at line 136 of file ex.h.
References bp.
Referenced by GiNaC::abs_expand(), GiNaC::matrix::add_indexed(), GiNaC::algebraic_match_mul_with_mul(), GiNaC::ncmul::append_factors(), GiNaC::basic::collect(), GiNaC::collect_symbols(), GiNaC::color_trace(), GiNaC::ncmul::count_factors(), GiNaC::csgn_eval(), GiNaC::const_postorder_iterator::descend(), GiNaC::divide(), end(), GiNaC::indexed::eval(), GiNaC::exp_expand(), GiNaC::indexed::expand(), GiNaC::integral::expand(), GiNaC::mul::expand(), find(), GiNaC::find_common_factor(), GiNaC::G2_eval(), GiNaC::G2_evalf(), GiNaC::G3_eval(), GiNaC::G3_evalf(), GiNaC::gcd_pf_mul(), GiNaC::get_all_dummy_indices_safely(), GiNaC::get_first_symbol(), GiNaC::get_symbol_stats(), GiNaC::H_evalf(), GiNaC::hasindex(), GiNaC::haswild(), GiNaC::const_preorder_iterator::increment(), GiNaC::lcmcoeff(), GiNaC::Li2_series(), GiNaC::Li_deriv(), GiNaC::Li_eval(), GiNaC::Li_evalf(), GiNaC::log_expand(), GiNaC::lsolve(), GiNaC::expairseq::match(), GiNaC::basic::match(), GiNaC::multiply_lcm(), GiNaC::nops(), postorder_begin(), preorder_begin(), GiNaC::product_to_exvector(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::matrix::scalar_mul_indexed(), GiNaC::integral::series(), GiNaC::step_eval(), GiNaC::symminfo::symminfo(), traverse_postorder(), traverse_preorder(), GiNaC::zeta1_evalf(), and GiNaC::zeta2_evalf().
|
inline |
Definition at line 137 of file ex.h.
Referenced by GiNaC::abs_eval(), GiNaC::matrix::add_indexed(), GiNaC::algebraic_match_mul_with_mul(), GiNaC::ncmul::append_factors(), GiNaC::atan_series(), GiNaC::atanh_series(), GiNaC::mul::can_be_further_expanded(), GiNaC::basic::collect(), GiNaC::collect_symbols(), GiNaC::color_trace(), GiNaC::su3f::contract_with(), GiNaC::su3d::contract_with(), GiNaC::matrix::contract_with(), GiNaC::cos_eval(), GiNaC::cosh_eval(), GiNaC::ncmul::count_factors(), GiNaC::csgn_eval(), GiNaC::decomp_rational(), denom(), GiNaC::const_postorder_iterator::descend(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::epsilon_tensor(), GiNaC::epsilon_tensor(), GiNaC::indexed::eval(), GiNaC::power::eval(), GiNaC::integral::eval_integ(), GiNaC::exp_eval(), GiNaC::indexed::expand(), GiNaC::integral::expand(), GiNaC::mul::expand(), find(), GiNaC::find_common_factor(), GiNaC::matrix::fraction_free_elimination(), GiNaC::G2_eval(), GiNaC::G2_evalf(), GiNaC::G3_eval(), GiNaC::G3_evalf(), GiNaC::gcd_pf_mul(), GiNaC::gcd_pf_pow(), GiNaC::gcd_pf_pow_pow(), GiNaC::get_all_dummy_indices_safely(), GiNaC::get_first_symbol(), GiNaC::clifford::get_metric(), GiNaC::H_evalf(), GiNaC::power::has(), GiNaC::hasindex(), GiNaC::haswild(), GiNaC::const_preorder_iterator::increment(), GiNaC::lcmcoeff(), GiNaC::Li2_series(), GiNaC::Li_deriv(), GiNaC::Li_evalf(), GiNaC::log_eval(), GiNaC::lorentz_eps(), GiNaC::lsolve(), GiNaC::expairseq::match(), GiNaC::basic::match(), GiNaC::multiply_lcm(), normal(), GiNaC::basic::normal(), GiNaC::power::normal(), numer(), GiNaC::op(), op(), GiNaC::op0_is_equal::operator()(), GiNaC::ex_base_is_less::operator()(), GiNaC::const_iterator::operator*(), GiNaC::const_iterator::operator[](), GiNaC::Order_eval(), GiNaC::product_to_exvector(), GiNaC::replace_with_symbol(), GiNaC::clifford::same_metric(), GiNaC::matrix::scalar_mul_indexed(), GiNaC::sin_eval(), GiNaC::sinh_eval(), GiNaC::spmapkey::spmapkey(), GiNaC::sqrfree_parfrac(), GiNaC::step_eval(), subs(), GiNaC::symminfo::symminfo(), GiNaC::tan_eval(), GiNaC::tanh_eval(), traverse_postorder(), traverse_preorder(), GiNaC::tryfactsubs(), and GiNaC::zeta2_deriv().
|
inline |
ex & GiNaC::ex::let_op | ( | size_t | i | ) |
Return modifiable operand/member at position i.
Definition at line 207 of file ex.cpp.
References bp, and makewriteable().
Referenced by GiNaC::H_evalf().
Definition at line 213 of file ex.cpp.
References bp, and makewriteable().
ex & GiNaC::ex::operator[] | ( | size_t | i | ) |
Definition at line 219 of file ex.cpp.
References bp, and makewriteable().
ex GiNaC::ex::lhs | ( | ) | const |
Left hand side of relational expression.
Definition at line 226 of file ex.cpp.
References bp.
Referenced by GiNaC::fsolve(), GiNaC::lhs(), GiNaC::pseries::pseries(), GiNaC::pseries::pseries(), GiNaC::Eisenstein_kernel::series(), GiNaC::Eisenstein_h_kernel::series(), GiNaC::modular_form_kernel::series(), GiNaC::mul::series(), and GiNaC::power::series().
ex GiNaC::ex::rhs | ( | ) | const |
Right hand side of relational expression.
Definition at line 234 of file ex.cpp.
References bp.
Referenced by GiNaC::fsolve(), GiNaC::pseries::pseries(), GiNaC::pseries::pseries(), GiNaC::rhs(), GiNaC::Eisenstein_h_kernel::series(), GiNaC::pseries::series(), GiNaC::mul::series(), GiNaC::power::series(), and GiNaC::symbol::series().
|
inline |
Definition at line 147 of file ex.h.
References bp, and conjugate().
Referenced by GiNaC::abs_expl_derivative(), GiNaC::abs_power(), GiNaC::acos_conjugate(), GiNaC::acosh_conjugate(), GiNaC::asin_conjugate(), GiNaC::asinh_conjugate(), GiNaC::atan_conjugate(), GiNaC::atanh_conjugate(), conjugate(), GiNaC::expair::conjugate(), GiNaC::add::conjugate(), GiNaC::container< C >::conjugate(), GiNaC::expairseq::conjugate(), GiNaC::integral::conjugate(), GiNaC::matrix::conjugate(), GiNaC::mul::conjugate(), GiNaC::power::conjugate(), GiNaC::pseries::conjugate(), GiNaC::conjugate(), GiNaC::conjugate_eval(), GiNaC::conjugate_evalf(), GiNaC::conjugateepvector(), GiNaC::cos_conjugate(), GiNaC::cosh_conjugate(), GiNaC::exp_conjugate(), GiNaC::lgamma_conjugate(), GiNaC::Li2_conjugate(), GiNaC::log_conjugate(), GiNaC::sin_conjugate(), GiNaC::sinh_conjugate(), GiNaC::tan_conjugate(), GiNaC::tanh_conjugate(), and GiNaC::tgamma_conjugate().
|
inline |
Definition at line 148 of file ex.h.
References bp, and real_part().
Referenced by GiNaC::abs_eval(), GiNaC::asinh_conjugate(), GiNaC::atan_conjugate(), GiNaC::conjugate_real_part(), GiNaC::mul::find_real_imag(), GiNaC::power::imag_part(), GiNaC::pseries::imag_part(), real_part(), GiNaC::add::real_part(), GiNaC::power::real_part(), GiNaC::pseries::real_part(), GiNaC::real_part(), and GiNaC::real_part_eval().
|
inline |
Definition at line 149 of file ex.h.
References bp, and imag_part().
Referenced by GiNaC::acos_conjugate(), GiNaC::acosh_conjugate(), GiNaC::asin_conjugate(), GiNaC::asinh_conjugate(), GiNaC::atan_conjugate(), GiNaC::atanh_conjugate(), GiNaC::conjugate_imag_part(), GiNaC::mul::find_real_imag(), imag_part(), GiNaC::add::imag_part(), GiNaC::power::imag_part(), GiNaC::imag_part(), GiNaC::imag_part_eval(), GiNaC::lgamma_conjugate(), GiNaC::Li2_conjugate(), GiNaC::log_conjugate(), and GiNaC::power::real_part().
|
inline |
Definition at line 152 of file ex.h.
Referenced by GiNaC::power::degree(), GiNaC::integral::eval(), GiNaC::integral::eval_integ(), GiNaC::integral::expand(), GiNaC::basic::has(), GiNaC::has(), GiNaC::power::is_polynomial(), and GiNaC::power::ldegree().
Find all occurrences of a pattern.
The found matches are appended to the "found" list. If the expression itself matches the pattern, the children are not further examined. This function returns true when any matches were found.
Definition at line 106 of file ex.cpp.
References find(), match(), nops(), and op().
Referenced by GiNaC::divide_in_z(), GiNaC::scalar_products::evaluate(), find(), GiNaC::find(), GiNaC::pseries::mul_series(), GiNaC::replace_with_symbol(), GiNaC::idx::subs(), and GiNaC::basic::subs_one_level().
bool GiNaC::ex::match | ( | const ex & | pattern | ) | const |
Check whether expression matches a specified pattern.
Definition at line 96 of file ex.cpp.
Referenced by find(), GiNaC::power::has(), match(), GiNaC::basic::match(), GiNaC::match(), and GiNaC::tryfactsubs().
Definition at line 842 of file ex.h.
References bp, m, options, and subs().
Referenced by GiNaC::adaptivesimpson(), GiNaC::mul::algebraic_subs_mul(), GiNaC::atan_series(), GiNaC::atanh_series(), GiNaC::beta_series(), GiNaC::collect_common_factors(), GiNaC::integral::conjugate(), GiNaC::csgn_series(), denom(), GiNaC::integral::derivative(), GiNaC::divide_in_z(), GiNaC::EllipticE_series(), GiNaC::EllipticK_series(), GiNaC::eta_series(), GiNaC::tensdelta::eval_indexed(), GiNaC::integral::eval_integ(), GiNaC::integral::evalf(), GiNaC::expand_dummy_sum(), GiNaC::fsolve(), GiNaC::gcd(), GiNaC::clifford::get_metric(), GiNaC::H_evalf(), GiNaC::heur_gcd_z(), GiNaC::modular_form_kernel::is_numeric(), GiNaC::user_defined_kernel::is_numeric(), GiNaC::user_defined_kernel::Laurent_series(), GiNaC::lgamma_series(), GiNaC::Li2_series(), GiNaC::Li_series(), GiNaC::log_series(), normal(), GiNaC::basic::normal(), GiNaC::power::normal(), numer(), numer_denom(), GiNaC::psi1_series(), GiNaC::psi2_series(), GiNaC::rename_dummy_indices(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::rename_dummy_indices_uniquely(), GiNaC::tensor::replace_contr_index(), GiNaC::replace_with_symbol(), GiNaC::replace_with_symbol(), GiNaC::S_series(), GiNaC::basic::series(), GiNaC::integral::series(), GiNaC::power::series(), GiNaC::step_series(), subs(), GiNaC::subs(), GiNaC::subs(), GiNaC::subs(), GiNaC::basic::subs(), subs(), GiNaC::clifford::subs(), GiNaC::idx::subs(), GiNaC::power::subs(), GiNaC::pseries::subs(), GiNaC::relational::subs(), GiNaC::basic::subs_one_level(), GiNaC::container< C >::subschildren(), GiNaC::expairseq::subschildren(), GiNaC::subsvalue(), GiNaC::symm(), GiNaC::symmetrize_cyclic(), GiNaC::tan_series(), GiNaC::tanh_series(), and GiNaC::tgamma_series().
Substitute objects in an expression (syntactic substitution) and return the result as a new expression.
Definition at line 121 of file ex.cpp.
References GiNaC::container< C >::begin(), bp, GiNaC::container< C >::end(), GINAC_ASSERT, lr, m, GiNaC::container< C >::nops(), options, GiNaC::subs_options::pattern_is_not_product, and GiNaC::subs_options::pattern_is_product.
Substitute objects in an expression (syntactic substitution) and return the result as a new expression.
There are two valid types of replacement arguments: 1) a relational like object==ex and 2) a list of relationals lst{object1==ex1,object2==ex2,...}.
Definition at line 145 of file ex.cpp.
References bp, GINAC_ASSERT, info(), GiNaC::info_flags::list, m, op(), options, GiNaC::subs_options::pattern_is_not_product, GiNaC::subs_options::pattern_is_product, r, GiNaC::info_flags::relation_equal, and subs().
|
inline |
Definition at line 163 of file ex.h.
Referenced by GiNaC::color_trace(), GiNaC::expand_dummy_sum(), and map().
|
inline |
Definition at line 167 of file ex.h.
References bp.
Referenced by traverse_postorder(), and traverse_preorder().
void GiNaC::ex::traverse_preorder | ( | visitor & | v | ) | const |
Traverse expression tree with given visitor, preorder traversal.
Definition at line 187 of file ex.cpp.
References accept(), n, nops(), op(), and traverse_preorder().
Referenced by traverse(), and traverse_preorder().
void GiNaC::ex::traverse_postorder | ( | visitor & | v | ) | const |
Traverse expression tree with given visitor, postorder traversal.
Definition at line 197 of file ex.cpp.
References accept(), n, nops(), op(), and traverse_postorder().
Referenced by traverse_postorder().
|
inline |
Definition at line 170 of file ex.h.
References traverse_preorder().
bool GiNaC::ex::is_polynomial | ( | const ex & | vars | ) | const |
Check whether expression is a polynomial.
Definition at line 242 of file ex.cpp.
References bp.
Referenced by GiNaC::is_polynomial(), and GiNaC::power::is_polynomial().
|
inline |
Definition at line 174 of file ex.h.
References bp.
Referenced by GiNaC::basic::collect(), content(), GiNaC::integral::degree(), GiNaC::mul::degree(), GiNaC::power::degree(), GiNaC::degree(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::get_symbol_stats(), GiNaC::heur_gcd_z(), lcoeff(), GiNaC::prem(), GiNaC::quo(), GiNaC::rem(), GiNaC::resultant(), GiNaC::sprem(), and GiNaC::sr_gcd().
|
inline |
Definition at line 175 of file ex.h.
References bp.
Referenced by content(), GiNaC::gcd_pf_pow(), GiNaC::get_symbol_stats(), GiNaC::mul::ldegree(), GiNaC::power::ldegree(), GiNaC::ldegree(), GiNaC::Order_series(), GiNaC::resultant(), GiNaC::mul::series(), GiNaC::power::series(), and tcoeff().
Definition at line 176 of file ex.h.
References bp, coeff(), and n.
Referenced by GiNaC::Bernoulli_polynomial(), coeff(), GiNaC::add::coeff(), GiNaC::mul::coeff(), GiNaC::ncmul::coeff(), GiNaC::pseries::coeff(), GiNaC::coeff(), GiNaC::basic::collect(), content(), GiNaC::pseries::convert_to_poly(), GiNaC::mul::derivative(), GiNaC::pseries::derivative(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::mul::eval(), GiNaC::power::eval(), GiNaC::pseries::eval_integ(), GiNaC::pseries::evalm(), GiNaC::pseries::expand(), GiNaC::power::expand_add_2(), GiNaC::expairseq::expandchildren(), GiNaC::pseries::exponop(), GiNaC::generalised_Bernoulli_number(), GiNaC::add::imag_part(), lcoeff(), GiNaC::lsolve(), GiNaC::expairseq::make_flat(), GiNaC::pseries::normal(), GiNaC::prem(), GiNaC::pseries::print_series(), GiNaC::quo(), GiNaC::add::real_part(), GiNaC::rem(), GiNaC::resultant(), GiNaC::mul::series(), GiNaC::integration_kernel::series_coeff(), GiNaC::sprem(), GiNaC::sqrfree_parfrac(), GiNaC::expairseq::subschildren(), and tcoeff().
Definition at line 177 of file ex.h.
References coeff(), and degree().
Referenced by content(), GiNaC::get_symbol_stats(), GiNaC::sr_gcd(), and unit().
ex GiNaC::ex::expand | ( | unsigned | options = 0 | ) | const |
Expand an expression.
options | see GiNaC::expand_options |
Definition at line 74 of file ex.cpp.
References bp, expand(), GiNaC::status_flags::expanded, and options.
Referenced by GiNaC::abs_expand(), GiNaC::binomial_sym(), GiNaC::color_trace(), content(), GiNaC::matrix::determinant(), GiNaC::matrix::determinant_minor(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::exp_expand(), GiNaC::expand(), GiNaC::expand(), expand(), GiNaC::indexed::expand(), GiNaC::integral::expand(), GiNaC::mul::expand(), GiNaC::power::expand(), GiNaC::pseries::expand(), GiNaC::expand_dummy_sum(), GiNaC::expairseq::expandchildren(), GiNaC::mul::expandchildren(), GiNaC::ncmul::expandchildren(), GiNaC::mul::find_real_imag(), GiNaC::frac_cancel(), GiNaC::matrix::fraction_free_elimination(), GiNaC::gcd(), GiNaC::heur_gcd_z(), GiNaC::log_expand(), GiNaC::lsolve(), GiNaC::expand_map_function::operator()(), GiNaC::prem(), GiNaC::quo(), GiNaC::rem(), GiNaC::resultant(), GiNaC::basic::series(), GiNaC::mul::series(), GiNaC::power::series(), GiNaC::sprem(), GiNaC::sqrfree_parfrac(), GiNaC::sr_gcd(), GiNaC::matrix::trace(), unit(), and unitcontprim().
Definition at line 182 of file ex.h.
Referenced by GiNaC::matrix::charpoly(), collect(), and GiNaC::collect().
Compute partial derivative of an expression.
s | symbol by which the expression is derived |
nth | order of derivative (default 1) |
Definition at line 87 of file ex.cpp.
Referenced by GiNaC::abs_expl_derivative(), GiNaC::conjugate_expl_derivative(), GiNaC::fderivative::derivative(), GiNaC::function::derivative(), GiNaC::integral::derivative(), GiNaC::ncmul::derivative(), GiNaC::power::derivative(), GiNaC::pseries::derivative(), GiNaC::diff(), GiNaC::basic::diff(), diff(), GiNaC::fsolve(), GiNaC::imag_part_expl_derivative(), GiNaC::log_series(), GiNaC::Order_expl_derivative(), GiNaC::real_part_expl_derivative(), GiNaC::basic::series(), and GiNaC::sqrfree_yun().
Compute the truncated series expansion of an expression.
This function returns an expression containing an object of class pseries to represent the series. If the series does not terminate within the given truncation order, the last term of the series will be an order term.
r | expansion relation, lhs holds variable and rhs holds point |
order | truncation order of series calculations |
options | of class series_options |
Definition at line 1272 of file pseries.cpp.
References GiNaC::_ex0, bp, options, order, r, and series().
Referenced by GiNaC::Bernoulli_polynomial(), GiNaC::EllipticE_series(), GiNaC::EllipticK_series(), GiNaC::generalised_Bernoulli_number(), GiNaC::modular_form_kernel::Laurent_series(), GiNaC::integration_kernel::Laurent_series(), GiNaC::Eisenstein_kernel::Laurent_series(), GiNaC::Eisenstein_h_kernel::Laurent_series(), GiNaC::user_defined_kernel::Laurent_series(), GiNaC::Li2_series(), GiNaC::Li_series(), GiNaC::log_series(), GiNaC::Eisenstein_h_kernel::q_expansion_modular_form(), GiNaC::S_series(), series(), GiNaC::series(), GiNaC::add::series(), GiNaC::integral::series(), GiNaC::Eisenstein_kernel::series(), GiNaC::Eisenstein_h_kernel::series(), GiNaC::modular_form_kernel::series(), GiNaC::pseries::series(), GiNaC::mul::series(), GiNaC::power::series(), and GiNaC::tgamma_series().
ex GiNaC::ex::normal | ( | ) | const |
Normalization of rational functions.
This function converts an expression to its normal form "numerator/denominator", where numerator and denominator are (relatively prime) polynomials. Any subexpressions which are not rational functions (like non-rational numbers, non-integer powers or functions like sin(), cos() etc.) are replaced by temporary symbols which are re-substituted by the (normalized) subexpressions before normal() returns (this way, any expression can be treated as a rational function). normal() is applied recursively to arguments of functions etc.
Definition at line 2519 of file normal.cpp.
References bp, GINAC_ASSERT, GiNaC::subs_options::no_pattern, GiNaC::container< C >::nops(), normal(), op(), GiNaC::container< C >::op(), and subs().
Referenced by denom(), GiNaC::matrix::determinant(), GiNaC::matrix::fraction_free_elimination(), GiNaC::matrix::gauss_elimination(), normal(), GiNaC::normal(), GiNaC::add::normal(), GiNaC::power::normal(), GiNaC::pseries::normal(), numer(), numer_denom(), and GiNaC::matrix::trace().
Rationalization of non-rational functions.
This function converts a general expression to a rational function by replacing all non-rational subexpressions (like non-rational numbers, non-integer powers or functions like sin(), cos() etc.) to temporary symbols. This makes it possible to use functions like gcd() and divide() on non-rational functions by applying to_rational() on the arguments, calling the desired function and re-substituting the temporary symbols in the result. To make the last step possible, all temporary symbols and their associated expressions are collected in the map specified by the repl parameter, ready to be passed as an argument to ex::subs().
repl | collects all temporary symbols and their replacements |
Definition at line 2627 of file normal.cpp.
References bp, and to_rational().
Referenced by GiNaC::matrix::determinant(), GiNaC::matrix::fraction_free_elimination(), GiNaC::to_rational(), to_rational(), GiNaC::expairseq::to_rational(), and GiNaC::power::to_rational().
Definition at line 2632 of file normal.cpp.
References bp, and to_polynomial().
Referenced by GiNaC::find_common_factor(), GiNaC::to_polynomial(), to_polynomial(), GiNaC::expairseq::to_polynomial(), and GiNaC::power::to_polynomial().
ex GiNaC::ex::numer | ( | ) | const |
Get numerator of an expression.
If the expression is not of the normal form "numerator/denominator", it is first converted to this form and then the numerator is returned.
Definition at line 2544 of file normal.cpp.
References bp, GINAC_ASSERT, GiNaC::subs_options::no_pattern, GiNaC::container< C >::nops(), normal(), op(), GiNaC::container< C >::op(), and subs().
Referenced by GiNaC::numer(), and GiNaC::numer().
ex GiNaC::ex::denom | ( | ) | const |
Get denominator of an expression.
If the expression is not of the normal form "numerator/denominator", it is first converted to this form and then the denominator is returned.
Definition at line 2569 of file normal.cpp.
References bp, GINAC_ASSERT, GiNaC::subs_options::no_pattern, GiNaC::container< C >::nops(), normal(), op(), GiNaC::container< C >::op(), and subs().
Referenced by GiNaC::denom(), and GiNaC::denom().
ex GiNaC::ex::numer_denom | ( | ) | const |
Get numerator and denominator of an expression.
If the expression is not of the normal form "numerator/denominator", it is first converted to this form and then a list [numerator, denominator] is returned.
Definition at line 2594 of file normal.cpp.
References bp, GINAC_ASSERT, GiNaC::subs_options::no_pattern, GiNaC::container< C >::nops(), normal(), GiNaC::container< C >::op(), and subs().
Referenced by GiNaC::matrix::fraction_free_elimination(), and GiNaC::numer_denom().
Compute unit part (= sign of leading coefficient) of a multivariate polynomial in Q[x].
The product of unit part, content part, and primitive part is the polynomial itself.
x | main variable |
Definition at line 923 of file normal.cpp.
References GiNaC::_ex1, GiNaC::_ex_1, c, expand(), GiNaC::get_first_symbol(), info(), lcoeff(), GiNaC::info_flags::negative, unit(), and x.
Referenced by content(), GiNaC::frac_cancel(), and unit().
Compute content part (= unit normal GCD of all coefficients) of a multivariate polynomial in Q[x].
The product of unit part, content part, and primitive part is the polynomial itself.
x | main variable |
Definition at line 945 of file normal.cpp.
References GiNaC::_ex0, c, coeff(), cont, degree(), expand(), GiNaC::gcd(), info(), GiNaC::info_flags::integer, integer_content(), is_zero(), lcoeff(), ldegree(), GiNaC::info_flags::negative, r, unit(), and x.
Referenced by GiNaC::sr_gcd(), and unitcontprim().
numeric GiNaC::ex::integer_content | ( | ) | const |
Compute the integer content (= GCD of all numeric coefficients) of an expanded polynomial.
For a polynomial with rational coefficients, this returns g/l where g is the GCD of the coefficients' numerators and l is the LCM of the coefficients' denominators.
Definition at line 318 of file normal.cpp.
References bp, and GiNaC::numeric::integer_content().
Referenced by content(), GiNaC::power::eval(), GiNaC::gcd(), and GiNaC::heur_gcd_z().
Compute primitive part of a multivariate polynomial in Q[x].
The result will be a unit-normal polynomial with a content part of 1. The product of unit part, content part, and primitive part is the polynomial itself.
x | main variable |
Definition at line 981 of file normal.cpp.
References c, unitcontprim(), and x.
Referenced by GiNaC::sr_gcd().
Compute primitive part of a multivariate polynomial in Q[x] when the content part is already known.
This function is faster in computing the primitive part than the previous function.
x | main variable |
c | previously computed content part |
Definition at line 997 of file normal.cpp.
References GiNaC::_ex0, GiNaC::_ex1, c, is_zero(), GiNaC::quo(), unit, and x.
Compute unit part, content part, and primitive part of a multivariate polynomial in Q[x].
The product of the three parts is the polynomial itself.
x | main variable |
u | unit part (returned) |
c | content part (returned) |
p | primitive part (returned) |
Definition at line 1022 of file normal.cpp.
References GiNaC::_ex0, GiNaC::_ex1, GiNaC::_ex_1, GiNaC::abs(), c, content(), expand(), info(), is_zero(), GiNaC::info_flags::negative, GiNaC::quo(), unit, and x.
Referenced by GiNaC::gcd(), and primpart().
numeric GiNaC::ex::max_coefficient | ( | ) | const |
Return maximum (absolute value) coefficient of a polynomial.
This function is used internally by heur_gcd().
Definition at line 1154 of file normal.cpp.
References bp, and GiNaC::numeric::max_coefficient().
Referenced by GiNaC::heur_gcd_z().
|
inline |
Definition at line 207 of file ex.h.
References bp.
Referenced by antisymmetrize(), GiNaC::get_all_dummy_indices_safely(), GiNaC::add::get_free_indices(), GiNaC::integral::get_free_indices(), GiNaC::mul::get_free_indices(), GiNaC::ncmul::get_free_indices(), GiNaC::clifford::get_metric(), GiNaC::clifford::same_metric(), symmetrize(), and symmetrize_cyclic().
ex GiNaC::ex::simplify_indexed | ( | unsigned | options = 0 | ) | const |
Simplify/canonicalize expression containing indexed objects.
This performs contraction of dummy indices where possible and checks whether the free indices in sums are consistent.
options | Simplification options (currently unused) |
Definition at line 1257 of file indexed.cpp.
References GiNaC::simplify_indexed().
Referenced by GiNaC::tensepsilon::contract_with(), GiNaC::simplify_indexed(), and GiNaC::simplify_indexed().
ex GiNaC::ex::simplify_indexed | ( | const scalar_products & | sp, |
unsigned | options = 0 |
||
) | const |
Simplify/canonicalize expression containing indexed objects.
This performs contraction of dummy indices where possible, checks whether the free indices in sums are consistent, and automatically replaces scalar products by known values if desired.
sp | Scalar products to be replaced automatically |
options | Simplification options (currently unused) |
Definition at line 1272 of file indexed.cpp.
References GiNaC::simplify_indexed().
|
inline |
Definition at line 323 of file ex.h.
Referenced by GiNaC::expair::compare(), GiNaC::expairseq::construct_from_2_ex(), GiNaC::expair::is_less(), GiNaC::error_and_integral_is_less::operator()(), GiNaC::ex_is_less::operator()(), GiNaC::expair_rest_is_less::operator()(), GiNaC::symminfo_is_less_by_symmterm::operator()(), GiNaC::symminfo_is_less_by_orig::operator()(), GiNaC::terminfo_is_less::operator()(), GiNaC::spmapkey::operator<(), and GiNaC::spmapkey::spmapkey().
|
inline |
Definition at line 346 of file ex.h.
Referenced by GiNaC::abs_power(), GiNaC::acos_eval(), GiNaC::acosh_eval(), GiNaC::matrix::add_indexed(), GiNaC::asin_eval(), GiNaC::atan2_eval(), GiNaC::atan_eval(), GiNaC::atan_series(), GiNaC::atanh_eval(), GiNaC::atanh_series(), GiNaC::beta_eval(), GiNaC::power::coeff(), GiNaC::pseries::coeff(), GiNaC::add::combine_ex_with_coeff_to_pair(), GiNaC::mul::combine_pair_with_coeff_to_pair(), GiNaC::conjugateepvector(), GiNaC::power::degree(), GiNaC::pseries::degree(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::mul::do_print_csrc(), GiNaC::power::do_print_csrc(), GiNaC::power::do_print_csrc_cl_N(), GiNaC::power::do_print_dflt(), GiNaC::power::do_print_latex(), GiNaC::expairseq::do_print_tree(), GiNaC::epsilon_tensor(), GiNaC::epsilon_tensor(), GiNaC::mul::eval(), GiNaC::power::eval(), GiNaC::matrix::eval_indexed(), GiNaC::tensdelta::eval_indexed(), GiNaC::tensmetric::eval_indexed(), GiNaC::mul::expand(), GiNaC::find_common_factor(), GiNaC::frac_cancel(), GiNaC::gcd(), GiNaC::gcd_pf_pow(), GiNaC::gcd_pf_pow_pow(), GiNaC::make_flat_inserter::handle_factor(), GiNaC::power::imag_part(), GiNaC::mul::info(), GiNaC::expair::is_canonical_numeric(), GiNaC::pseries::is_compatible_to(), GiNaC::idx::is_dummy_pair_same_type(), GiNaC::expair::is_equal(), GiNaC::expairseq::is_equal_same_type(), is_zero(), GiNaC::power::ldegree(), GiNaC::pseries::ldegree(), GiNaC::Li2_eval(), GiNaC::Li2_series(), GiNaC::Li_eval(), GiNaC::log_eval(), GiNaC::lorentz_eps(), GiNaC::expairseq::map(), GiNaC::expairseq::match(), GiNaC::idx::match_same_type(), GiNaC::minimal_dim(), GiNaC::pseries::mul_series(), GiNaC::multiply_lcm(), GiNaC::expairseq::nops(), GiNaC::power::normal(), GiNaC::expairseq::op(), GiNaC::ex_is_equal::operator()(), GiNaC::op0_is_equal::operator()(), GiNaC::idx_is_equal_ignore_dim::operator()(), GiNaC::spmapkey::operator==(), GiNaC::add::print_add(), GiNaC::mul::print_overall_coeff(), GiNaC::expairseq::printseq(), GiNaC::product_to_exvector(), GiNaC::quo(), GiNaC::power::real_part(), GiNaC::mul::recombine_pair_to_ex(), GiNaC::rem(), GiNaC::replace_with_symbol(), GiNaC::clifford::same_metric(), GiNaC::pseries::series(), GiNaC::power::series(), GiNaC::add::split_ex_to_pair(), and GiNaC::sqrfree_yun().
|
inline |
Definition at line 214 of file ex.h.
References GiNaC::_ex0, and is_equal().
Referenced by GiNaC::acos_conjugate(), GiNaC::acos_eval(), GiNaC::acosh_conjugate(), GiNaC::acosh_eval(), GiNaC::pseries::add_series(), GiNaC::asin_conjugate(), GiNaC::asin_eval(), GiNaC::asinh_eval(), GiNaC::atan(), GiNaC::atan(), GiNaC::atan2_eval(), GiNaC::atan_eval(), GiNaC::atanh_conjugate(), GiNaC::atanh_eval(), GiNaC::add::coeff(), content(), GiNaC::cosh_eval(), GiNaC::add::degree(), GiNaC::fderivative::derivative(), GiNaC::function::derivative(), GiNaC::matrix::determinant(), GiNaC::matrix::determinant_minor(), GiNaC::basic::diff(), GiNaC::divide(), GiNaC::divide_in_z(), GiNaC::add::do_print_csrc(), GiNaC::matrix::echelon_form(), GiNaC::add::eval(), GiNaC::function::eval(), GiNaC::indexed::eval(), GiNaC::mul::eval(), GiNaC::power::eval(), GiNaC::pseries::evalm(), GiNaC::exp_eval(), GiNaC::mul::expand(), GiNaC::pseries::expand(), GiNaC::power::expand_add(), GiNaC::power::expand_add_2(), GiNaC::find_common_factor(), GiNaC::mul::find_real_imag(), GiNaC::frac_cancel(), GiNaC::matrix::fraction_free_elimination(), GiNaC::gcd(), GiNaC::heur_gcd_z(), GiNaC::add::imag_part(), GiNaC::add::info(), GiNaC::interpolate(), GiNaC::is_zero(), GiNaC::is_zero(), is_zero_matrix(), GiNaC::add::ldegree(), GiNaC::lgamma_conjugate(), GiNaC::Li2_conjugate(), GiNaC::Li2_eval(), GiNaC::Li2_series(), GiNaC::Li3_eval(), GiNaC::Li_series(), GiNaC::log(), GiNaC::log_conjugate(), GiNaC::log_eval(), GiNaC::log_series(), GiNaC::matrix::markowitz_elimination(), GiNaC::pseries::mul_series(), GiNaC::pseries::normal(), GiNaC::relational::operator safe_bool(), GiNaC::Order_eval(), GiNaC::prem(), primpart(), GiNaC::add::print_add(), GiNaC::pseries::print_series(), GiNaC::quo(), GiNaC::add::real_part(), GiNaC::rem(), GiNaC::S_series(), GiNaC::clifford::same_metric(), GiNaC::basic::series(), GiNaC::power::series(), GiNaC::symbol::series(), GiNaC::sinh_eval(), GiNaC::add::smod(), GiNaC::sprem(), GiNaC::sqrfree_yun(), GiNaC::tanh_eval(), unitcontprim(), and GiNaC::indexed::validate().
bool GiNaC::ex::is_zero_matrix | ( | ) | const |
ex GiNaC::ex::symmetrize | ( | ) | const |
Symmetrize expression over its free indices.
Definition at line 1279 of file indexed.cpp.
References get_free_indices(), and GiNaC::symmetrize().
Referenced by GiNaC::symmetrize(), and GiNaC::symmetrize().
Symmetrize expression over a list of objects (symbols, indices).
Definition at line 556 of file symmetry.cpp.
References GiNaC::container< C >::begin(), GiNaC::container< C >::end(), and GiNaC::symm().
ex GiNaC::ex::antisymmetrize | ( | ) | const |
Antisymmetrize expression over its free indices.
Definition at line 1285 of file indexed.cpp.
References GiNaC::antisymmetrize(), and get_free_indices().
Referenced by GiNaC::antisymmetrize(), and GiNaC::antisymmetrize().
Antisymmetrize expression over a list of objects (symbols, indices).
Definition at line 563 of file symmetry.cpp.
References GiNaC::container< C >::begin(), GiNaC::container< C >::end(), and GiNaC::symm().
ex GiNaC::ex::symmetrize_cyclic | ( | ) | const |
Symmetrize expression by cyclic permutation over its free indices.
Definition at line 1291 of file indexed.cpp.
References get_free_indices(), and GiNaC::symmetrize_cyclic().
Referenced by GiNaC::symmetrize_cyclic(), and GiNaC::symmetrize_cyclic().
Symmetrize expression by cyclic permutation over a list of objects (symbols, indices).
Definition at line 571 of file symmetry.cpp.
References GiNaC::container< C >::begin(), GiNaC::container< C >::end(), and GiNaC::symmetrize_cyclic().
|
inline |
Definition at line 231 of file ex.h.
References bp.
Referenced by GiNaC::ncmul::append_factors(), GiNaC::ncmul::count_factors(), GiNaC::power::eval(), GiNaC::exmul(), GiNaC::matrix::mul_scalar(), GiNaC::indexed::return_type(), GiNaC::integral::return_type(), GiNaC::power::return_type(), and GiNaC::relational::return_type().
|
inline |
Definition at line 232 of file ex.h.
References bp.
Referenced by GiNaC::color_trace(), GiNaC::indexed::return_type_tinfo(), GiNaC::integral::return_type_tinfo(), GiNaC::power::return_type_tinfo(), and GiNaC::relational::return_type_tinfo().
|
inline |
Definition at line 234 of file ex.h.
References bp.
Referenced by GiNaC::basic::calchash(), GiNaC::expairseq::calchash(), GiNaC::function::calchash(), GiNaC::idx::calchash(), and GiNaC::relational::calchash().
Helper function for the ex-from-basic constructor.
This is where GiNaC's automatic evaluator and memory management are implemented.
Definition at line 293 of file ex.cpp.
References bp, GiNaC::basic::duplicate(), GiNaC::status_flags::dynallocated, GiNaC::basic::eval(), GiNaC::status_flags::evaluated, GiNaC::basic::flags, GiNaC::refcounted::get_refcount(), GINAC_ASSERT, and GiNaC::basic::setflag().
|
staticprivate |
Definition at line 351 of file ex.cpp.
References GiNaC::_num0_p, GiNaC::_num10_p, GiNaC::_num11_p, GiNaC::_num12_p, GiNaC::_num1_p, GiNaC::_num2_p, GiNaC::_num3_p, GiNaC::_num4_p, GiNaC::_num5_p, GiNaC::_num6_p, GiNaC::_num7_p, GiNaC::_num8_p, GiNaC::_num9_p, GiNaC::_num_10_p, GiNaC::_num_11_p, GiNaC::_num_12_p, GiNaC::_num_1_p, GiNaC::_num_2_p, GiNaC::_num_3_p, GiNaC::_num_4_p, GiNaC::_num_5_p, GiNaC::_num_6_p, GiNaC::_num_7_p, GiNaC::_num_8_p, and GiNaC::_num_9_p.
Referenced by construct_from_longlong().
|
staticprivate |
Definition at line 409 of file ex.cpp.
References GiNaC::_num0_p, GiNaC::_num10_p, GiNaC::_num11_p, GiNaC::_num12_p, GiNaC::_num1_p, GiNaC::_num2_p, GiNaC::_num3_p, GiNaC::_num4_p, GiNaC::_num5_p, GiNaC::_num6_p, GiNaC::_num7_p, GiNaC::_num8_p, and GiNaC::_num9_p.
Referenced by construct_from_ulonglong().
|
staticprivate |
Definition at line 443 of file ex.cpp.
References GiNaC::_num0_p, GiNaC::_num10_p, GiNaC::_num11_p, GiNaC::_num12_p, GiNaC::_num1_p, GiNaC::_num2_p, GiNaC::_num3_p, GiNaC::_num4_p, GiNaC::_num5_p, GiNaC::_num6_p, GiNaC::_num7_p, GiNaC::_num8_p, GiNaC::_num9_p, GiNaC::_num_10_p, GiNaC::_num_11_p, GiNaC::_num_12_p, GiNaC::_num_1_p, GiNaC::_num_2_p, GiNaC::_num_3_p, GiNaC::_num_4_p, GiNaC::_num_5_p, GiNaC::_num_6_p, GiNaC::_num_7_p, GiNaC::_num_8_p, and GiNaC::_num_9_p.
|
staticprivate |
Definition at line 501 of file ex.cpp.
References GiNaC::_num0_p, GiNaC::_num10_p, GiNaC::_num11_p, GiNaC::_num12_p, GiNaC::_num1_p, GiNaC::_num2_p, GiNaC::_num3_p, GiNaC::_num4_p, GiNaC::_num5_p, GiNaC::_num6_p, GiNaC::_num7_p, GiNaC::_num8_p, and GiNaC::_num9_p.
|
staticprivate |
Definition at line 535 of file ex.cpp.
References construct_from_int().
|
staticprivate |
Definition at line 544 of file ex.cpp.
References construct_from_uint().
|
staticprivate |
|
staticprivate |
|
private |
Make this ex writable (if more than one ex handle the same basic) by unlinking the object and creating an unshared copy of it.
Definition at line 270 of file ex.cpp.
References bp, GiNaC::status_flags::dynallocated, and GINAC_ASSERT.
Referenced by let_op(), operator[](), and operator[]().
|
private |
Share equal objects between expressions.
Definition at line 279 of file ex.cpp.
References bp, and GiNaC::status_flags::not_shareable.
Referenced by compare(), and is_equal().
|
friend |
|
friend |
Return a reference to the basic-derived class T object embedded in an expression.
This is fast but unsafe: the result is undefined if the expression does not contain a T object at its top level. Hence, you should generally check the type of e first. Also, you shouldn't cache the returned reference because GiNaC's garbage collector may destroy the referenced object any time it's used in another expression.
e | expression |
|
friend |
|
friend |
pointer to basic object managed by this
Definition at line 252 of file ex.h.
Referenced by accept(), GiNaC::archive_node::archive_node(), coeff(), collect(), compare(), conjugate(), construct_from_basic(), dbgprint(), dbgprinttree(), degree(), denom(), diff(), eval(), eval_integ(), eval_ncmul(), evalf(), evalm(), ex(), ex(), ex(), ex(), ex(), ex(), ex(), ex(), ex(), ex(), expand(), get_free_indices(), gethash(), has(), GiNaC::archive_node::has_same_ex_as(), imag_part(), info(), integer_content(), is_equal(), is_polynomial(), ldegree(), let_op(), lhs(), makewriteable(), map(), match(), match(), max_coefficient(), nops(), normal(), numer(), numer_denom(), op(), operator[](), operator[](), operator[](), operator[](), print(), GiNaC::archive_node::printraw(), real_part(), return_type(), return_type_tinfo(), rhs(), series(), share(), smod(), subs(), subs(), subs(), swap(), to_polynomial(), and to_rational().