Nestedsums library
transcendental_C.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_C_H__
27#define __NESTEDSUMS_TRANSCENDENTAL_C_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
34
59 class transcendental_sum_type_C : public GiNaC::basic
60 {
61 GINAC_DECLARE_REGISTERED_CLASS(transcendental_sum_type_C, GiNaC::basic)
62
63 // ctors
64 public:
65 transcendental_sum_type_C(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
66 const GiNaC::ex & eps, int o, int f);
67
68 // functions overriding virtual functions from base classes
69 public:
70 void archive(GiNaC::archive_node &node) const override;
71 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
72
73 unsigned return_type(void) const override { return GiNaC::return_types::noncommutative; }
74
75 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
76 unsigned precedence(void) const override {return 40;}
77 GiNaC::ex eval() const override;
78 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const override;
79
80 protected:
81 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const override;
82 GiNaC::ex derivative(const GiNaC::symbol & s) const override;
83 unsigned calchash(void) const override;
84
85 // new virtual functions which can be overridden by derived classes
86 public:
87 virtual GiNaC::ex eval_explicit() const;
88 virtual unsigned get_key(void) const;
89 virtual GiNaC::ex hash_data(void) const;
90 virtual GiNaC::ex subst_data(void) const;
91
92 // non-virtual functions
93 public:
94 GiNaC::ex set_expansion(void) const;
95 GiNaC::ex distribute_over_subsum(void) const;
96 GiNaC::ex distribute_over_letter(void) const;
97 GiNaC::ex shift_plus_one(void) const;
98 GiNaC::ex shift_minus_one(void) const;
99
100 protected:
101
102 // member variables :
103
104 protected:
105
106 GiNaC::ex n;
107 GiNaC::ex index;
108 GiNaC::ex letter;
109 GiNaC::ex lst_of_gammas;
110 GiNaC::ex subsum;
111
112 GiNaC::ex expansion_parameter;
113
114 int order;
115
116 mutable int flag_expand_status;
117 };
118
119GINAC_DECLARE_UNARCHIVER(transcendental_sum_type_C);
120
126inline GiNaC::ex create_transcendental_sum_type_C(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss,
127 const GiNaC::ex & eps, int o, int f)
128 {
129 return (new transcendental_sum_type_C(nn,i,l,v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
130 }
131
137inline GiNaC::ex create_transcendental_sum_type_C_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l,
138 const GiNaC::ex & v, const GiNaC::ex & ss,
139 const GiNaC::ex & eps, int o, int f)
140 {
141 // set index, expansion_parameter and order in the Gamma functions
142 GiNaC::ex new_v = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(v).gamma_sequence,i,eps,o);
143
144 return (new transcendental_sum_type_C(nn,i,l,new_v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
145 }
146
147GiNaC::ex create_transcendental_sum_type_C_and_expand(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l,
148 const GiNaC::ex & v, const GiNaC::ex & ss,
149 const GiNaC::ex & eps, int o);
150
151} // namespace nestedsums
152
153#endif // ndef __NESTEDSUMS_TRANSCENDENTAL_C_H__
A letter is a basic_letter with offset=0.
Definition letter.h:45
The class transcendental_sum_type_C involves a conjugation.
Definition transcendental_C.h:60
GiNaC::ex eval_ncmul(const GiNaC::exvector &v) const override
Definition transcendental_C.cc:699
GiNaC::ex distribute_over_subsum(void) const
Definition transcendental_C.cc:803
virtual GiNaC::ex eval_explicit() const
Definition transcendental_C.cc:1059
virtual unsigned get_key(void) const
Definition transcendental_C.cc:729
GiNaC::ex eval() const override
Definition transcendental_C.cc:310
virtual GiNaC::ex hash_data(void) const
Definition transcendental_C.cc:740
virtual GiNaC::ex subst_data(void) const
Definition transcendental_C.cc:753
GiNaC::ex set_expansion(void) const
Definition transcendental_C.cc:768
GiNaC::ex distribute_over_letter(void) const
Definition transcendental_C.cc:1002
GiNaC::ex shift_plus_one(void) const
Definition transcendental_C.cc:1116
GiNaC::ex shift_minus_one(void) const
Definition transcendental_C.cc:1217
Definition basic_letter.cc:35
GiNaC::ex create_transcendental_sum_type_C(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_C.h:126
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
ex create_transcendental_sum_type_C_and_expand(const ex &nn, const ex &i, const ex &l, const ex &v, const ex &ss, const ex &eps, int o)
Definition transcendental_C.cc:1307
GiNaC::ex create_transcendental_sum_type_C_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_C.h:137