Nestedsums library
transcendental_A.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_A_H__
27#define __NESTEDSUMS_TRANSCENDENTAL_A_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
36
56 class transcendental_sum_type_A : public GiNaC::basic
57 {
58 GINAC_DECLARE_REGISTERED_CLASS(transcendental_sum_type_A, GiNaC::basic)
59
60 // ctors
61 public:
62 transcendental_sum_type_A(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
63 const GiNaC::ex & eps, int o, int f);
64
65 // functions overriding virtual functions from base classes
66 public:
67 void archive(GiNaC::archive_node &node) const override;
68 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
69
70 unsigned return_type(void) const override { return GiNaC::return_types::noncommutative; }
71
72 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
73 unsigned precedence(void) const override {return 40;}
74 GiNaC::ex eval() const override;
75 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const override;
76
77 protected:
78 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const override;
79 GiNaC::ex derivative(const GiNaC::symbol & s) const override;
80 unsigned calchash(void) const override;
81
82 // new virtual functions which can be overridden by derived classes
83 public:
84 virtual GiNaC::ex eval_explicit() const;
85 virtual unsigned get_key(void) const;
86 virtual GiNaC::ex hash_data(void) const;
87 virtual GiNaC::ex subst_data(void) const;
88
89 // non-virtual functions
90 public:
91 GiNaC::ex set_expansion(void) const;
92 GiNaC::ex distribute_over_subsum(void) const;
93 GiNaC::ex distribute_over_letter(void) const;
94 GiNaC::ex shift_plus_one(void) const;
95 GiNaC::ex shift_minus_one(void) const;
96
97 protected:
98
99 // member variables :
100
101 protected:
102
103 GiNaC::ex n;
104 GiNaC::ex index;
105 GiNaC::ex letter;
106 GiNaC::ex lst_of_gammas;
107 GiNaC::ex subsum;
108
109 GiNaC::ex expansion_parameter;
110
111 int order;
112
113 mutable int flag_expand_status;
114 };
115
116GINAC_DECLARE_UNARCHIVER(transcendental_sum_type_A);
117
123inline GiNaC::ex create_transcendental_sum_type_A(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
124 const GiNaC::ex & eps, int o, int f)
125 {
126 return (new transcendental_sum_type_A(nn,i,l,v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
127 }
128
134inline GiNaC::ex create_transcendental_sum_type_A_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i,
135 const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
136 const GiNaC::ex & eps, int o, int f)
137 {
138 // set index, expansion_parameter and order in the Gamma functions
139 GiNaC::ex new_v = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(v).gamma_sequence,i,eps,o);
140
141 return (new transcendental_sum_type_A(nn,i,l,new_v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
142 }
143
144GiNaC::ex create_transcendental_sum_type_A_and_expand(const GiNaC::ex & nn, const GiNaC::ex & i,
145 const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
146 const GiNaC::ex & eps, int o);
147
148} // namespace nestedsums
149
150#endif // ndef __NESTEDSUMS_TRANSCENDENTAL_A_H__
A letter is a basic_letter with offset=0.
Definition letter.h:45
Definition transcendental_A.h:57
GiNaC::ex eval_ncmul(const GiNaC::exvector &v) const override
Definition transcendental_A.cc:658
GiNaC::ex distribute_over_subsum(void) const
Definition transcendental_A.cc:761
virtual GiNaC::ex eval_explicit() const
Definition transcendental_A.cc:1018
virtual unsigned get_key(void) const
Definition transcendental_A.cc:688
GiNaC::ex eval() const override
Definition transcendental_A.cc:278
virtual GiNaC::ex hash_data(void) const
Definition transcendental_A.cc:699
virtual GiNaC::ex subst_data(void) const
Definition transcendental_A.cc:712
GiNaC::ex set_expansion(void) const
Definition transcendental_A.cc:726
GiNaC::ex distribute_over_letter(void) const
Definition transcendental_A.cc:961
GiNaC::ex shift_plus_one(void) const
Definition transcendental_A.cc:1068
GiNaC::ex shift_minus_one(void) const
Definition transcendental_A.cc:1165
Definition basic_letter.cc:35
GiNaC::ex create_transcendental_sum_type_A(const GiNaC::ex &nn, const GiNaC::ex &i, const GiNaC::ex &l, const GiNaC::ex &v, const GiNaC::ex &ss, const GiNaC::ex &eps, int o, int f)
Definition transcendental_A.h:123
ex create_transcendental_sum_type_A_and_expand(const ex &nn, const ex &i, const ex &l, const ex &v, const ex &ss, const ex &eps, int o)
Definition transcendental_A.cc:1286
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_A_and_set_gammas(const GiNaC::ex &nn, const GiNaC::ex &i, const GiNaC::ex &l, const GiNaC::ex &v, const GiNaC::ex &ss, const GiNaC::ex &eps, int o, int f)
Definition transcendental_A.h:134