Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

list_polygamma.h

Go to the documentation of this file.
00001 00008 /* 00009 * Copyright (C) 2001 Stefan Weinzierl 00010 * 00011 * This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 00026 #ifndef __NESTEDSUMS_LIST_POLYGAMMA_H__ 00027 #define __NESTEDSUMS_LIST_POLYGAMMA_H__ 00028 00029 #include "ginac/ginac.h" 00030 00031 namespace nestedsums { 00032 00034 00049 class list_of_tgamma : public GiNaC::basic 00050 { 00051 friend class transcendental_sum_type_A; 00052 friend class transcendental_sum_type_B; 00053 friend class transcendental_sum_type_C; 00054 friend class transcendental_sum_type_D; 00055 00056 GINAC_DECLARE_REGISTERED_CLASS(list_of_tgamma, GiNaC::basic) 00057 00058 // ctors 00059 public: 00060 explicit list_of_tgamma(const GiNaC::ex & l); 00061 list_of_tgamma(const GiNaC::ex & l, const GiNaC::ex & i, const GiNaC::ex & eps, int o); 00062 00063 // functions overriding virtual functions from base classes 00064 public: 00065 void archive(GiNaC::archive_node &node) const; 00066 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst); 00067 00068 unsigned return_type(void) const { return GiNaC::return_types::noncommutative; } 00069 00070 void print(const GiNaC::print_context & c, unsigned level = 0) const; 00071 unsigned precedence(void) const {return 50;} 00072 GiNaC::ex eval(int level = 0) const; 00073 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const; 00074 00075 protected: 00076 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const; 00077 GiNaC::ex derivative(const GiNaC::symbol & s) const; 00078 unsigned calchash(void) const; 00079 00080 // new virtual functions which can be overridden by derived classes 00081 public: 00082 virtual GiNaC::ex eval_explicit(int level = 0) const; 00083 virtual unsigned get_key(void) const; 00084 virtual GiNaC::ex hash_data(void) const; 00085 virtual GiNaC::ex subst_data(void) const; 00086 00087 // non-virtual functions 00088 public: 00089 GiNaC::ex set_expansion(void) const; 00090 GiNaC::ex set_index(const GiNaC::ex & new_index) const; 00091 GiNaC::ex set_expansion_parameter(const GiNaC::ex & new_eps) const; 00092 GiNaC::ex set_order(int new_order) const; 00093 00094 GiNaC::ex get_index(void) const; 00095 unsigned get_depth(void) const; 00096 00097 GiNaC::ex shift_plus_one(void) const; 00098 GiNaC::ex shift_minus_one(void) const; 00099 GiNaC::ex index_eq_one(void) const; 00100 GiNaC::ex shift_index(const GiNaC::ex & new_index) const; 00101 00102 GiNaC::ex concat(const GiNaC::ex & l) const; 00103 00104 int pole_alert(void) const; 00105 int expansion_alert(void) const; 00106 00107 00108 // friends : 00109 friend GiNaC::ex create_transcendental_sum_type_A_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, 00110 const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss, 00111 const GiNaC::ex & eps, int o, int f); 00112 friend GiNaC::ex create_transcendental_sum_type_B_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr, 00113 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00114 const GiNaC::ex & eps, int o, int f); 00115 friend GiNaC::ex create_transcendental_sum_type_C_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, 00116 const GiNaC::ex & v, const GiNaC::ex & ss, 00117 const GiNaC::ex & eps, int o, int f); 00118 friend 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, 00119 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00120 const GiNaC::ex & eps, int o, int f); 00121 00122 // member variables : 00123 00124 protected: 00125 00126 GiNaC::ex gamma_sequence; 00127 GiNaC::ex index; 00128 GiNaC::ex expansion_parameter; 00129 int order; 00130 }; 00131 00132 GINAC_DECLARE_UNARCHIVER(list_of_tgamma); 00133 00134 // inline functions 00135 00141 inline GiNaC::ex list_of_tgamma::get_index(void) const 00142 { 00143 return index; 00144 } 00145 00151 inline unsigned list_of_tgamma::get_depth(void) const 00152 { 00153 return gamma_sequence.nops(); 00154 } 00155 00161 inline GiNaC::ex create_list_of_tgamma(const GiNaC::ex & l) 00162 { 00163 return (new list_of_tgamma(l))->setflag(GiNaC::status_flags::dynallocated); 00164 } 00165 00171 inline GiNaC::ex create_list_of_tgamma(const GiNaC::ex & l, const GiNaC::ex & i, const GiNaC::ex & eps, int o) 00172 { 00173 return (new list_of_tgamma(l,i,eps,o))->setflag(GiNaC::status_flags::dynallocated); 00174 } 00175 00181 inline GiNaC::ex create_list_of_tgamma_and_set_gammas(const GiNaC::ex & l, const GiNaC::ex & i, const GiNaC::ex & eps, int o) 00182 { 00183 // set index, expansion_parameter and order in the Gamma functions 00184 GiNaC::lst* vl = new GiNaC::lst(); 00185 vl->setflag(GiNaC::status_flags::dynallocated); 00186 int j; 00187 for (j=0;j<l.nops();j++) 00188 { 00189 vl->append(GiNaC::ex_to<ratio_of_tgamma>(l.op(j)).set_values(i,eps,o,expand_status::no_eval_to_scalar)); 00190 } 00191 return (new list_of_tgamma(*vl,i,eps,o))->setflag(GiNaC::status_flags::dynallocated); 00192 } 00193 00194 } // namespace nestedsums 00195 00196 #endif // ndef __NESTEDSUMS_LIST_POLYGAMMA_H__

Generated on Wed Jun 10 22:59:10 2009 for Nestedsums library by doxygen 1.3.7