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. More... | |
bool | is_equal (const expair &other) const |
Member-wise check for canonical ordering equality. More... | |
bool | is_less (const expair &other) const |
Member-wise check for canonical ordering lessness. More... | |
int | compare (const expair &other) const |
Member-wise check for canonical ordering. More... | |
void | print (std::ostream &os) const |
bool | is_canonical_numeric () const |
True if this is of the form (numeric,ex(1)). More... | |
void | swap (expair &other) |
Swap contents with other expair. More... | |
const expair | conjugate () const |
Public Attributes | |
ex | rest |
first member of pair, an arbitrary expression More... | |
ex | coeff |
second member of pair, must be numeric More... | |
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 conjugate().
Construct an expair from two ex.
Definition at line 43 of file expair.h.
References coeff, and GINAC_ASSERT.
|
inline |
Member-wise check for canonical ordering equality.
Definition at line 49 of file expair.h.
References coeff, GiNaC::ex::is_equal(), and rest.
Referenced by GiNaC::expairseq::evalchildren(), GiNaC::mul::expair_needs_further_processing(), and GiNaC::expairseq::subschildren().
|
inline |
Member-wise check for canonical ordering lessness.
Definition at line 55 of file expair.h.
References coeff, GiNaC::ex::compare(), and rest.
Referenced by GiNaC::expair_is_less::operator()().
|
inline |
Member-wise check for canonical ordering.
Definition at line 63 of file expair.h.
References coeff, GiNaC::ex::compare(), and rest.
void GiNaC::expair::print | ( | std::ostream & | os | ) | const |
Definition at line 30 of file expair.cpp.
References c, coeff, GiNaC::ex::print(), 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::ex::is_equal(), and rest.
|
inline |
Swap contents with other expair.
Definition at line 82 of file expair.h.
References coeff, rest, and GiNaC::ex::swap().
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, GiNaC::ex::conjugate(), expair(), and rest.
ex GiNaC::expair::rest |
first member of pair, an arbitrary expression
Definition at line 90 of file expair.h.
Referenced by GiNaC::expairseq::combine_pair_with_coeff_to_pair(), GiNaC::add::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(), is_canonical_numeric(), is_equal(), is_less(), GiNaC::expair_rest_is_less::operator()(), print(), GiNaC::expairseq::printpair(), GiNaC::expairseq::recombine_pair_to_ex(), GiNaC::add::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::expairseq::combine_pair_with_coeff_to_pair(), GiNaC::add::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(), GiNaC::power::expand_mul(), is_canonical_numeric(), is_equal(), is_less(), print(), GiNaC::expairseq::printpair(), GiNaC::expairseq::recombine_pair_to_ex(), GiNaC::add::recombine_pair_to_ex(), GiNaC::mul::recombine_pair_to_ex(), and swap().