Nestedsums library
polygamma.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_POLYGAMMA_H__
27#define __NESTEDSUMS_POLYGAMMA_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
34
54 class ratio_of_tgamma : public GiNaC::basic
55 {
56 friend class list_of_tgamma;
57
58 GINAC_DECLARE_REGISTERED_CLASS(ratio_of_tgamma, GiNaC::basic)
59
60 // ctors
61 public:
62 ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2);
63 ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2, const GiNaC::ex & i, const GiNaC::ex & eps,
64 int o, int f);
65
66 // functions overriding virtual functions from base classes
67 public:
68 void archive(GiNaC::archive_node &node) const override;
69 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
70
71 unsigned return_type(void) const override { return GiNaC::return_types::noncommutative; }
72
73 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
74 unsigned precedence(void) const override {return 50;}
75 GiNaC::ex eval() const override;
76 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const override;
77
78 protected:
79 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const override;
80 GiNaC::ex derivative(const GiNaC::symbol & s) const override;
81 unsigned calchash(void) const override;
82
83 // new virtual functions which can be overridden by derived classes
84 public:
85 virtual GiNaC::ex eval_explicit() const;
86
87 // non-virtual functions
88 public:
89 GiNaC::ex set_expansion(void) const;
90 GiNaC::ex set_index(const GiNaC::ex & new_index) const;
91 GiNaC::ex set_expansion_parameter(const GiNaC::ex & new_eps) const;
92 GiNaC::ex set_order(int new_order) const;
93 GiNaC::ex set_flag(int new_flag) const;
94 GiNaC::ex set_values(const GiNaC::ex & new_index, const GiNaC::ex & new_eps, int new_order, int new_flag) const;
95
96 GiNaC::ex get_index(void) const;
97
98 GiNaC::ex shift_plus_one(void) const;
99 GiNaC::ex shift_minus_one(void) const;
100 GiNaC::ex index_eq_one(void) const;
101 GiNaC::ex shift_index(const GiNaC::ex & new_index) const;
102
103 int pole_alert(void) const;
104 int expansion_alert(void) const;
105
106 protected:
107 GiNaC::ex increase_numerator(int shift_order = 0) const;
108 GiNaC::ex decrease_numerator(int shift_order = 0) const;
109 GiNaC::ex increase_denominator(int shift_order = 0) const;
110 GiNaC::ex decrease_denominator(int shift_order = 0) const;
111
112 GiNaC::ex prefactor_increase_numerator(void) const;
113 GiNaC::ex prefactor_decrease_numerator(void) const;
114 GiNaC::ex prefactor_increase_denominator(void) const;
115 GiNaC::ex prefactor_decrease_denominator(void) const;
116
117 // member variables :
118
119 protected:
120
121 GiNaC::ex a1;
122 GiNaC::ex b1;
123 GiNaC::ex a2;
124 GiNaC::ex b2;
125
126 GiNaC::ex index;
127 GiNaC::ex expansion_parameter;
128
129 int order;
130 int flag_expand_status;
131 };
132
133GINAC_DECLARE_UNARCHIVER(ratio_of_tgamma);
134
140inline GiNaC::ex create_ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2)
141 {
142 return (new ratio_of_tgamma(a1,b1,a2,b2))->setflag(GiNaC::status_flags::dynallocated);
143 }
144
150inline GiNaC::ex create_ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2, const GiNaC::ex & i, const GiNaC::ex & eps,
151 int o, int f)
152 {
153 return (new ratio_of_tgamma(a1,b1,a2,b2,i,eps,o,f))->setflag(GiNaC::status_flags::dynallocated);
154 }
155
156 GiNaC::ex eval_ratio_of_tgamma_to_scalar(const GiNaC::ex & expr);
157
158} // namespace nestedsums
159
160#endif // ndef __NESTEDSUMS_POLYGAMMA_H__
The class list_of_tgamma is a container for the class ratio_of_tgamma.
Definition list_polygamma.h:50
The class ratio_of_tgamma contains the ratio of two Gamma functions.
Definition polygamma.h:55
GiNaC::ex prefactor_increase_denominator(void) const
Definition polygamma.cc:672
GiNaC::ex eval_ncmul(const GiNaC::exvector &v) const override
Definition polygamma.cc:415
GiNaC::ex set_expansion_parameter(const GiNaC::ex &new_eps) const
Definition polygamma.cc:491
virtual GiNaC::ex eval_explicit() const
Definition polygamma.cc:444
GiNaC::ex index_eq_one(void) const
Definition polygamma.cc:746
GiNaC::ex shift_index(const GiNaC::ex &new_index) const
Definition polygamma.cc:760
GiNaC::ex prefactor_decrease_denominator(void) const
Definition polygamma.cc:688
GiNaC::ex set_flag(int new_flag) const
Definition polygamma.cc:515
GiNaC::ex decrease_numerator(int shift_order=0) const
Definition polygamma.cc:577
GiNaC::ex eval() const override
Definition polygamma.cc:320
int pole_alert(void) const
Definition polygamma.cc:772
GiNaC::ex set_values(const GiNaC::ex &new_index, const GiNaC::ex &new_eps, int new_order, int new_flag) const
Definition polygamma.cc:527
int expansion_alert(void) const
Definition polygamma.cc:784
GiNaC::ex increase_denominator(int shift_order=0) const
Definition polygamma.cc:598
GiNaC::ex set_index(const GiNaC::ex &new_index) const
Definition polygamma.cc:479
GiNaC::ex set_expansion(void) const
Definition polygamma.cc:467
GiNaC::ex increase_numerator(int shift_order=0) const
Definition polygamma.cc:556
GiNaC::ex get_index(void) const
Definition polygamma.cc:539
GiNaC::ex shift_plus_one(void) const
Definition polygamma.cc:712
GiNaC::ex shift_minus_one(void) const
Definition polygamma.cc:729
GiNaC::ex decrease_denominator(int shift_order=0) const
Definition polygamma.cc:619
GiNaC::ex set_order(int new_order) const
Definition polygamma.cc:503
GiNaC::ex prefactor_increase_numerator(void) const
Definition polygamma.cc:636
GiNaC::ex prefactor_decrease_numerator(void) const
Definition polygamma.cc:659
Definition basic_letter.cc:35
ex eval_ratio_of_tgamma_to_scalar(const ex &expr)
Definition polygamma.cc:799
GiNaC::ex create_ratio_of_tgamma(const GiNaC::ex &a1, const GiNaC::ex &b1, const GiNaC::ex &a2, const GiNaC::ex &b2)
Definition polygamma.h:140