Nestedsums library
|
A basic_letter is an element of an alphabet. More...
#include <basic_letter.h>
Public Member Functions | |
basic_letter (const GiNaC::ex &l, const GiNaC::ex &d, const GiNaC::ex &o) | |
basic_letter (const GiNaC::ex &l, const GiNaC::ex &d, const GiNaC::ex &o, const GiNaC::ex &i) | |
void | archive (GiNaC::archive_node &node) const override |
void | read_archive (const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override |
unsigned | return_type (void) const override |
void | print (const GiNaC::print_context &c, unsigned level=0) const override |
unsigned | precedence (void) const override |
GiNaC::ex | eval () const override |
GiNaC::ex | subs (const GiNaC::exmap &m, unsigned options=0) const override |
virtual GiNaC::ex | concat (const GiNaC::ex &l) const |
virtual GiNaC::ex | eval_explicit () const |
virtual GiNaC::ex | expand_members (int level=0) const |
GiNaC::ex | get_scale (void) const |
GiNaC::ex | get_degree (void) const |
GiNaC::ex | get_offset (void) const |
GiNaC::ex | get_index (void) const |
GiNaC::ex | set_index (const GiNaC::ex &i) const |
GiNaC::ex | forget_index (void) const |
GiNaC::ex | shift_index (const GiNaC::ex &new_index) const |
GiNaC::ex | index_eq_one (void) const |
GiNaC::ex | shift_plus_one (void) const |
GiNaC::ex | shift_minus_one (void) const |
GiNaC::ex | degree_minus_one (void) const |
GiNaC::ex | degree_plus_one (void) const |
Protected Member Functions | |
GiNaC::ex | eval_ncmul (const GiNaC::exvector &v) const override |
GiNaC::ex | derivative (const GiNaC::symbol &s) const override |
unsigned | calchash (void) const override |
virtual GiNaC::ex | concat_speedy (const GiNaC::ex &l) const |
Protected Attributes | |
GiNaC::ex | scale |
GiNaC::ex | degree |
GiNaC::ex | offset |
GiNaC::ex | index |
Friends | |
GiNaC::ex | concat (const basic_letter &l1, const basic_letter &l2) |
A basic_letter is an element of an alphabet.
The model for a basic_letter is
Here is the scale, the degree, the offset and a parameter (usually a summation index). does not need to be specified. In this case the index is set to the default index.
Two basic_letters can be multiplied ("concatenated") to form a new basic_letter.
|
protectedvirtual |
Same as concat, but does not perform any checking. Assumes that the indices are the same or equal to the default one.
The multiplication is performed if the two basic_letters have
unequal offsets, but both degrees are integers (and not symbols).
If one of the degrees is zero, we have
If both degrees are positive, we have
If one degree is positive ( ), the other negative ( ), we have
Finally, if both degrees are negative, we have
To avoid an infinite recursion in the last case, the algorithm does not commute two basic_letters.
The multiplication does not alter the offset, e.g. if we have and for all , then the evaluated product of the two basic_letters has only the offsets or . Multiplying two basic_letters does not introduce poles.
The result gets the index from the first letter, if this one differs from _default_index, otherwise the result gets the index from the second letter.
The routine returns unevaluated if
Reimplemented in letter, and unit_letter.
ex degree_minus_one | ( | void | ) | const |
Returns a basic_letter with degree-1
ex degree_plus_one | ( | void | ) | const |
Returns a basic_letter with degree+1
|
override |
If the offset is zero, evaluation returns a letter .
If the index is an integer, the object is evaluated explicitly.
|
virtual |
Explicit evaluation.
|
overrideprotected |
A product of two basic_letter's is simplified, if
A product is also simplified if the difference between the two indices is an integer, according to
where . Note that the algorithm returns a product, where both factors have the "smaller" index.
ex forget_index | ( | void | ) | const |
Sets the index to the default index.
|
inline |
Returns the degree
|
inline |
Returns the index
|
inline |
Returns the offset
|
inline |
Returns the scale
ex index_eq_one | ( | void | ) | const |
Returns
ex set_index | ( | const GiNaC::ex & | i | ) | const |
Sets the index to
ex shift_index | ( | const GiNaC::ex & | new_index | ) | const |
Adjusts the index according to
ex shift_minus_one | ( | void | ) | const |
Returns a basic_letter with offset-1
ex shift_plus_one | ( | void | ) | const |
Returns a basic_letter with offset+1
|
friend |
Concat two letters.