Nestedsums library
transcendental_D.h
Go to the documentation of this file.
1
8/*
9 * Copyright (C) 2001-2017 Stefan Weinzierl
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26#ifndef __NESTEDSUMS_TRANSCENDENTAL_D_H__
27#define __NESTEDSUMS_TRANSCENDENTAL_D_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
35
71 class transcendental_sum_type_D : public GiNaC::basic
72 {
73 GINAC_DECLARE_REGISTERED_CLASS(transcendental_sum_type_D, GiNaC::basic)
74
75 // ctors
76 public:
77 transcendental_sum_type_D(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr,
78 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr,
79 const GiNaC::ex & eps, int o, int f);
80
81 // functions overriding virtual functions from base classes
82 public:
83 void archive(GiNaC::archive_node &node) const override;
84 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
85
86 unsigned return_type(void) const override { return GiNaC::return_types::noncommutative; }
87
88 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
89 unsigned precedence(void) const override {return 40;}
90 GiNaC::ex eval() const override;
91 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const override;
92
93 protected:
94 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const override;
95 GiNaC::ex derivative(const GiNaC::symbol & s) const override;
96 unsigned calchash(void) const override;
97
98 // new virtual functions which can be overridden by derived classes
99 public:
100 virtual GiNaC::ex eval_explicit() const;
101
102 // non-virtual functions
103 public:
104 GiNaC::ex set_expansion(void) const;
105 GiNaC::ex distribute_over_subsum(void) const;
106 GiNaC::ex distribute_over_letter(void) const;
107 GiNaC::ex distribute_over_subsum_rev(void) const;
108 GiNaC::ex distribute_over_letter_rev(void) const;
109 GiNaC::ex shift_plus_one(void) const;
110 GiNaC::ex shift_plus_one_rev(void) const;
111 GiNaC::ex shift_minus_one(void) const;
112
113 protected:
114
115 // member variables :
116
117 protected:
118
119 GiNaC::ex n;
120 GiNaC::ex index;
121 GiNaC::ex letter;
122 GiNaC::ex letter_rev;
123 GiNaC::ex lst_of_gammas;
124 GiNaC::ex lst_of_gammas_rev;
125 GiNaC::ex subsum;
126 GiNaC::ex subsum_rev;
127
128 GiNaC::ex expansion_parameter;
129
130 int order;
131
132 mutable int flag_expand_status;
133 };
134
135GINAC_DECLARE_UNARCHIVER(transcendental_sum_type_D);
136
142inline GiNaC::ex create_transcendental_sum_type_D(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr,
143 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr,
144 const GiNaC::ex & eps, int o, int f)
145 {
146 return (new transcendental_sum_type_D(nn,i,l,lr,v,vr,ss,ssr,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
147 }
148
154inline GiNaC::ex create_transcendental_sum_type_D_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr,
155 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr,
156 const GiNaC::ex & eps, int o, int f)
157 {
158 // set index, expansion_parameter and order in the Gamma functions
159 GiNaC::ex new_v = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(v).gamma_sequence,i,eps,o);
160
161 // set index, expansion_parameter and order in the Gamma functions
162 GiNaC::ex new_vr = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(vr).gamma_sequence,nn-i,eps,o);
163
164 return (new transcendental_sum_type_D(nn,i,l,lr,new_v,new_vr,ss,ssr,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
165 }
166
167GiNaC::ex create_transcendental_sum_type_D_and_expand(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr,
168 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr,
169 const GiNaC::ex & eps, int o);
170
171} // namespace nestedsums
172
173#endif // ndef __NESTEDSUMS_TRANSCENDENTAL_D_H__
A letter is a basic_letter with offset=0.
Definition letter.h:45
Definition transcendental_D.h:72
GiNaC::ex eval_ncmul(const GiNaC::exvector &v) const override
Definition transcendental_D.cc:1336
GiNaC::ex distribute_over_subsum(void) const
Definition transcendental_D.cc:1410
virtual GiNaC::ex eval_explicit() const
Definition transcendental_D.cc:1951
GiNaC::ex shift_plus_one_rev(void) const
Definition transcendental_D.cc:2110
GiNaC::ex distribute_over_letter_rev(void) const
Definition transcendental_D.cc:1895
GiNaC::ex eval() const override
Definition transcendental_D.cc:523
GiNaC::ex set_expansion(void) const
Definition transcendental_D.cc:1373
GiNaC::ex distribute_over_letter(void) const
Definition transcendental_D.cc:1832
GiNaC::ex shift_plus_one(void) const
Definition transcendental_D.cc:2030
GiNaC::ex shift_minus_one(void) const
Definition transcendental_D.cc:2222
GiNaC::ex distribute_over_subsum_rev(void) const
Definition transcendental_D.cc:1631
Definition basic_letter.cc:35
ex create_transcendental_sum_type_D_and_expand(const ex &nn, const ex &i, const ex &l, const ex &lr, const ex &v, const ex &vr, const ex &ss, const ex &ssr, const ex &eps, int o)
Definition transcendental_D.cc:2323
GiNaC::ex create_list_of_tgamma_and_set_gammas(const GiNaC::ex &l, const GiNaC::ex &i, const GiNaC::ex &eps, int o)
Definition list_polygamma.h:181
GiNaC::ex create_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)
Definition transcendental_D.h:142
GiNaC::ex create_transcendental_sum_type_D_and_set_gammas(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)
Definition transcendental_D.h:154