GiNaC 1.8.7
|
A pair of expressions. More...
#include <expair.h>
Public Member Functions | |
expair () | |
expair (const ex &r, const ex &c) | |
Construct an expair from two ex. | |
bool | is_equal (const expair &other) const |
Member-wise check for canonical ordering equality. | |
bool | is_less (const expair &other) const |
Member-wise check for canonical ordering lessness. | |
int | compare (const expair &other) const |
Member-wise check for canonical ordering. | |
void | print (std::ostream &os) const |
bool | is_canonical_numeric () const |
True if this is of the form (numeric,ex(1)). | |
void | swap (expair &other) |
Swap contents with other expair. | |
const expair | conjugate () const |
Public Attributes | |
ex | rest |
first member of pair, an arbitrary expression | |
ex | coeff |
second member of pair, must be numeric |
A pair of expressions.
This is similar to STL's pair<>. It is slightly extended since we need to account for methods like .compare(). Also, since this is meant for use by class expairseq it must satisfy the invariance that the member coeff must be of type numeric.
|
inline |
Definition at line 40 of file expair.h.
Referenced by compare(), conjugate(), is_equal(), is_less(), and swap().
Construct an expair from two ex.
Definition at line 43 of file expair.h.
References coeff, GINAC_ASSERT, GiNaC::is_exactly_a(), and rest.
|
inline |
Member-wise check for canonical ordering equality.
Definition at line 49 of file expair.h.
References coeff, expair(), and rest.
Referenced by GiNaC::conjugateepvector(), GiNaC::expairseq::evalchildren(), GiNaC::mul::expair_needs_further_processing(), and GiNaC::expairseq::subschildren().
|
inline |
|
inline |
void GiNaC::expair::print | ( | std::ostream & | os | ) | const |
Definition at line 30 of file expair.cpp.
References coeff, GiNaC::print_tree::delta_indent, and rest.
|
inline |
True if this is of the form (numeric,ex(1)).
Definition at line 75 of file expair.h.
References coeff, GINAC_ASSERT, GiNaC::is_exactly_a(), and rest.
|
inline |
Swap contents with other expair.
Definition at line 82 of file expair.h.
References coeff, expair(), and rest.
Referenced by GiNaC::mul::derivative(), GiNaC::expair_swap::operator()(), and GiNaC::swap().
const expair GiNaC::expair::conjugate | ( | ) | const |
Definition at line 38 of file expair.cpp.
References GiNaC::are_ex_trivially_equal(), coeff, expair(), and rest.
Referenced by GiNaC::conjugateepvector().
ex GiNaC::expair::rest |
first member of pair, an arbitrary expression
Definition at line 90 of file expair.h.
Referenced by GiNaC::add::combine_pair_with_coeff_to_pair(), GiNaC::expairseq::combine_pair_with_coeff_to_pair(), GiNaC::mul::combine_pair_with_coeff_to_pair(), compare(), conjugate(), GiNaC::expairseq::construct_from_2_ex(), GiNaC::expairseq::construct_from_expairseq_ex(), expair(), expair(), is_canonical_numeric(), is_equal(), is_less(), GiNaC::expair_rest_is_less::operator()(), print(), GiNaC::expairseq::printpair(), GiNaC::add::recombine_pair_to_ex(), GiNaC::expairseq::recombine_pair_to_ex(), GiNaC::mul::recombine_pair_to_ex(), and swap().
ex GiNaC::expair::coeff |
second member of pair, must be numeric
Definition at line 91 of file expair.h.
Referenced by GiNaC::mul::can_make_flat(), GiNaC::add::combine_pair_with_coeff_to_pair(), GiNaC::expairseq::combine_pair_with_coeff_to_pair(), GiNaC::mul::combine_pair_with_coeff_to_pair(), compare(), conjugate(), GiNaC::expairseq::construct_from_2_ex(), GiNaC::expairseq::construct_from_expairseq_ex(), expair(), expair(), GiNaC::power::expand_mul(), is_canonical_numeric(), is_equal(), is_less(), print(), GiNaC::expairseq::printpair(), GiNaC::add::recombine_pair_to_ex(), GiNaC::expairseq::recombine_pair_to_ex(), GiNaC::mul::recombine_pair_to_ex(), and swap().