Nestedsums library
|
#include <transcendental_D.h>
Public Member Functions | |
transcendental_sum_type_D (const GiNaC::ex &nn, const GiNaC::ex &i, const GiNaC::ex &l, const GiNaC::ex &lr, const GiNaC::ex &v, const GiNaC::ex &vr, const GiNaC::ex &ss, const GiNaC::ex &ssr, const GiNaC::ex &eps, int o, int f) | |
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 | eval_explicit () const |
GiNaC::ex | set_expansion (void) const |
GiNaC::ex | distribute_over_subsum (void) const |
GiNaC::ex | distribute_over_letter (void) const |
GiNaC::ex | distribute_over_subsum_rev (void) const |
GiNaC::ex | distribute_over_letter_rev (void) const |
GiNaC::ex | shift_plus_one (void) const |
GiNaC::ex | shift_plus_one_rev (void) const |
GiNaC::ex | shift_minus_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 |
The class transcendental_sum_type_D involves a conjugation and may contain and . The definition is
Here, , , , and all , , and are integers. In addition is non-negative or Simmilar, is non-negative or
Note that the upper summation limit is . The upper summation limit should not be infinity.
ex distribute_over_letter | ( | void | ) | const |
letter is allowed to contain a sum of products (e.g. an expression in expanded form). Each term can contain scalars and basic_letters.
This routine converts the transcendental_sum_type_D to a canonical form, so that afterwards letter only contains a basic_letter.
ex distribute_over_letter_rev | ( | void | ) | const |
letter_rev is allowed to contain a sum of products (e.g. an expression in expanded form). Each term can contain scalars and basic_letters.
This routine converts the transcendental_sum_type_D to a canonical form, so that afterwards letter_rev only contains a basic_letter.
ex distribute_over_subsum | ( | void | ) | const |
subsum is allowed to contain a sum of products (e.g. an expression in expanded form). Each term can contain scalars, basic_letters, list_of_tgammas, Zsums or Ssums.
This routine converts the transcendental_sum_type_D to a canonical form, so that afterwards subsum only contains a Ssum.
The algorithm is based on the following steps:
ex distribute_over_subsum_rev | ( | void | ) | const |
subsum_rev is allowed to contain a sum of products (e.g. an expression in expanded form). Each term can contain scalars, basic_letters, list_of_tgammas, Zsums or Ssums.
This routine converts the transcendental_sum_type_D to a canonical form, so that afterwards subsum_rev only contains a Ssum.
The algorithm is based on the following steps:
|
override |
Simplifications, which are always performed are:
If flag_expand_status == expand_status::expansion_required, the evaluation routine performs a set of consistency checks:
If one of the tests fails, the object is put into a zombie state.
If flag_expand_status == expand_status::check_for_poles, it assures that the Gamma functions in the numerator do not give rise to poles. The functions shift_plus_one() and shift_plus_one_rev() are used.
If flag_expand_status == expand_status::expand_gamma_functions, the Gamma functions are expanded into Euler Zagier sums. This is done by setting the expansion_required flag in the ratio_of_tgamma class.
If flag_expand_status == expand_status::do_partial_fractioning, the sum is of the form
For we have
For we have
For we use
For we use
For and we have
If flag_expand_status == expand_status::adjust_summation_index, we deal with sums of the form
with . Here eval adjusts the offset. In the case the function shift_minus_one() is called.
If flag_expand_status == expand_status::do_outermost_sum, the sum is of the form
If the depth of is zero, we have a sum of type C:
We now can assume that the depth of the subsum is non-zero and we distinguish the cases , and .
If the depth of the subsum is zero, we obtain
We now can assume that the depths of the subsum and subsum_rev are non-zero. We then treat the cases and separately. If we have a sum of the form
This sum can be rewritten as
If we obtain
|
virtual |
Explicit evaluation
|
overrideprotected |
No automatic simplifications
ex set_expansion | ( | void | ) | const |
Sets the flag flag_expand_status to expand_status::expansion_required. The object is then automatically expanded up to the order specified in the member variable order.
ex shift_minus_one | ( | void | ) | const |
This routine assumes sums of the form
and performs the substitution index -> index + 1.
If we use the binomial formula
If the depth of the subsum is zero, we have
If the depth of the subsum is not equal to zero, we have
This routine is called from eval/adjust_summation_index only for .
ex shift_plus_one | ( | void | ) | const |
This routine performs the substitution index -> index - 1. The formula used is
ex shift_plus_one_rev | ( | void | ) | const |
This routine takes out the term at index = n - 1. The formula used is