Nestedsums library
|
Ssums form an algebra. More...
#include <Ssum.h>
Public Member Functions | |
Ssum (const GiNaC::ex &nc) | |
Ssum (const GiNaC::ex &nc, const GiNaC::ex &llc) | |
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 | convert_to_Zsum_exvector (const GiNaC::exvector &Z0, const GiNaC::exvector &Z1) const |
virtual GiNaC::ex | shuffle_exvector (const GiNaC::exvector &Z0, const GiNaC::exvector &Z1, const GiNaC::exvector &Z2) const |
virtual GiNaC::ex | refine_exvector (unsigned q, const GiNaC::exvector &Z0, const GiNaC::exvector &Z1) const |
virtual GiNaC::ex | refine (unsigned q) const |
virtual GiNaC::ex | set_index (const GiNaC::ex &i) const |
virtual GiNaC::ex | shift_plus_one (void) const |
virtual GiNaC::ex | shift_minus_one (void) const |
virtual GiNaC::ex | adjust_upper_limit_downwards (const GiNaC::ex &i) const |
virtual GiNaC::ex | adjust_upper_limit_upwards (const GiNaC::ex &i) const |
virtual GiNaC::ex | adjust_upper_limit_plus_one (void) const |
virtual GiNaC::ex | index_eq_one (void) const |
virtual GiNaC::ex | get_head (int k) const |
virtual GiNaC::ex | get_tail (int k) const |
virtual int | flag_remove_negative_degrees (void) const |
virtual GiNaC::ex | remove_negative_degrees (void) const |
virtual GiNaC::ex | expand_members (int level=0) const |
virtual GiNaC::ex | eval_explicit () const |
virtual GiNaC::ex | get_first_letter (void) const |
virtual GiNaC::ex | remove_first_letter (void) const |
virtual GiNaC::ex | remove_first_letter (const GiNaC::ex &nc) const |
virtual GiNaC::ex | prepend_letter (const GiNaC::ex &lc) const |
virtual GiNaC::ex | prepend_letter (const GiNaC::ex &nc, const GiNaC::ex &lc) const |
virtual GiNaC::ex | append_letter (const GiNaC::ex &lc) const |
virtual GiNaC::ex | append_letter_list (const GiNaC::ex &lc) const |
GiNaC::ex | get_index (void) const |
GiNaC::ex | get_letter_list (void) const |
unsigned | get_depth (void) const |
GiNaC::ex | get_weight (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 | cast_to_Zsum (void) const |
virtual GiNaC::ex | multiply_letter_with_last_letter (const GiNaC::ex &lc) const |
virtual GiNaC::ex | multiply_letter_with_first_letter (const GiNaC::ex &lc) const |
virtual GiNaC::ex | concat_two_sums (const GiNaC::ex &Z1, const GiNaC::ex &Z2) const |
Protected Attributes | |
GiNaC::ex | n |
GiNaC::ex | letter_list |
Friends | |
class | Csum |
GiNaC::ex | shuffle_Ssum (const GiNaC::ex &Z1, const GiNaC::ex &Z2) |
GiNaC::ex | convert_Ssum_to_Zsum (const GiNaC::ex &Z1) |
GiNaC::ex | remove_trivial_Ssum (const GiNaC::ex &expr) |
Ssums form an algebra.
A Ssum is recursively defined by
with
for and
for .
Ssums can be converted to Zsums (and vice versa).
All letters should have their index set to _default_index.
|
virtual |
Adjusts the upper summation limit down to , e.g.
with .
For the empty sum we have
This routine assumes .
Reimplemented in harmonic_sum.
|
virtual |
|
virtual |
Adjusts the upper summation limit up to , e.g.
with .
For the empty sum we have
This routine assumes .
This routine might give rise to poles for some values of and should be used with care.
Reimplemented in harmonic_sum.
|
virtual |
Appends the letter lc to the letter_list.
|
virtual |
Appends the list lc to the letter_list.
|
protectedvirtual |
Creates a Zsum with the same upper summation index and the same letter_list.
This is a crude cast, something like reinterpret_cast.
|
protectedvirtual |
Takes Z1 as head and Z2 as tail and forms a new sum as the concatenation of the two.
|
virtual |
Method to convert a Ssum to a Zsum.
An efficient version for the conversion to Zsums, based on exvector (e.g. std::vector<GiNaC::ex> ). Z0 contains the result. Z1 is reversed order, so that we can use pop_back.
The basic formula is
Reimplemented in harmonic_sum.
|
override |
The simplifications are done in the following order:
|
virtual |
Explicit evaluation
|
overrideprotected |
A product of Ssums is simplified, if the last two have the same upper summation index.
A product is also simplified if the difference between the two upper summation indices is an integer. The factor with the "larger" upper summation index is converted to the "smaller" index with the help of the function Zsum::adjust_upper_limit_downwards. Note that the algorithm returns a product, where both factors have the "smaller" index.
|
virtual |
Signals if there are letters with negative or zero degrees.
Only for Ssums.
|
inline |
Returns the depth.
|
virtual |
Returns the first letter from the letter_list.
|
virtual |
Returns from the S-sum the head .
|
inline |
Returns the upper summation limit.
|
inline |
Returns the letter_list.
|
virtual |
Returns from the S-sum the tail .
ex get_weight | ( | void | ) | const |
Returns the weight.
|
virtual |
Returns
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Method to convert a Ssum with upper limit to Ssums with upper limit .
|
virtual |
Helper routine to convert a Ssum with upper limit to Ssums with upper limit .
Z0 contains the result in reversed order. Z1 the letter list, which has to be converted.
The basic formula is
Here are roots of unity.
|
virtual |
Returns a Ssum with the first letter removed from the letter_list.
Reimplemented in harmonic_sum.
|
virtual |
Removes letters with non-positive degrees.
The basic formula is
For we have
For we have
and the sums can be done analytically with the help of the Bernoulli numbers:
|
virtual |
Sets the upper summation index to
Reimplemented in harmonic_sum.
|
virtual |
Returns
Reimplemented in harmonic_sum.
|
virtual |
Returns
Reimplemented in harmonic_sum.
|
virtual |
Method to multiply two Ssums.
An efficient version for the multiplication of Ssums, based on exvector (e.g. std::vector<GiNaC::ex> ). Z0 contains the result. Z1 and Z2 are in reversed order, so that we can use pop_back.
The basic formula is
Note the minus sign in front of the last term.
Reimplemented in harmonic_sum.