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

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_POLYGAMMA_H__ 00027 #define __NESTEDSUMS_POLYGAMMA_H__ 00028 00029 #include "ginac/ginac.h" 00030 00031 namespace nestedsums { 00032 00034 00054 class ratio_of_tgamma : public GiNaC::basic 00055 { 00056 friend class list_of_tgamma; 00057 00058 GINAC_DECLARE_REGISTERED_CLASS(ratio_of_tgamma, GiNaC::basic) 00059 00060 // ctors 00061 public: 00062 ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2); 00063 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, 00064 int o, int f); 00065 00066 // functions overriding virtual functions from base classes 00067 public: 00068 void archive(GiNaC::archive_node &node) const; 00069 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst); 00070 00071 unsigned return_type(void) const { return GiNaC::return_types::noncommutative; } 00072 00073 void print(const GiNaC::print_context & c, unsigned level = 0) const; 00074 unsigned precedence(void) const {return 50;} 00075 GiNaC::ex eval(int level = 0) const; 00076 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const; 00077 00078 protected: 00079 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const; 00080 GiNaC::ex derivative(const GiNaC::symbol & s) const; 00081 unsigned calchash(void) const; 00082 00083 // new virtual functions which can be overridden by derived classes 00084 public: 00085 virtual GiNaC::ex eval_explicit(int level = 0) 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 GiNaC::ex set_flag(int new_flag) const; 00094 GiNaC::ex set_values(const GiNaC::ex & new_index, const GiNaC::ex & new_eps, int new_order, int new_flag) const; 00095 00096 GiNaC::ex get_index(void) const; 00097 00098 GiNaC::ex shift_plus_one(void) const; 00099 GiNaC::ex shift_minus_one(void) const; 00100 GiNaC::ex index_eq_one(void) const; 00101 GiNaC::ex shift_index(const GiNaC::ex & new_index) const; 00102 00103 int pole_alert(void) const; 00104 int expansion_alert(void) const; 00105 00106 protected: 00107 GiNaC::ex increase_numerator(int shift_order = 0) const; 00108 GiNaC::ex decrease_numerator(int shift_order = 0) const; 00109 GiNaC::ex increase_denominator(int shift_order = 0) const; 00110 GiNaC::ex decrease_denominator(int shift_order = 0) const; 00111 00112 GiNaC::ex prefactor_increase_numerator(void) const; 00113 GiNaC::ex prefactor_decrease_numerator(void) const; 00114 GiNaC::ex prefactor_increase_denominator(void) const; 00115 GiNaC::ex prefactor_decrease_denominator(void) const; 00116 00117 // member variables : 00118 00119 protected: 00120 00121 GiNaC::ex a1; 00122 GiNaC::ex b1; 00123 GiNaC::ex a2; 00124 GiNaC::ex b2; 00125 00126 GiNaC::ex index; 00127 GiNaC::ex expansion_parameter; 00128 00129 int order; 00130 int flag_expand_status; 00131 }; 00132 00133 GINAC_DECLARE_UNARCHIVER(ratio_of_tgamma); 00134 00140 inline GiNaC::ex create_ratio_of_tgamma(const GiNaC::ex & a1, const GiNaC::ex & b1, const GiNaC::ex & a2, const GiNaC::ex & b2) 00141 { 00142 return (new ratio_of_tgamma(a1,b1,a2,b2))->setflag(GiNaC::status_flags::dynallocated); 00143 } 00144 00150 inline 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, 00151 int o, int f) 00152 { 00153 return (new ratio_of_tgamma(a1,b1,a2,b2,i,eps,o,f))->setflag(GiNaC::status_flags::dynallocated); 00154 } 00155 00156 GiNaC::ex eval_ratio_of_tgamma_to_scalar(const GiNaC::ex & expr); 00157 00158 } // namespace nestedsums 00159 00160 #endif // ndef __NESTEDSUMS_POLYGAMMA_H__

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