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

transcendental_B.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_TRANSCENDENTAL_B_H__ 00027 #define __NESTEDSUMS_TRANSCENDENTAL_B_H__ 00028 00029 #include "ginac/ginac.h" 00030 00031 namespace nestedsums { 00032 00034 00068 class transcendental_sum_type_B : public GiNaC::basic 00069 { 00070 GINAC_DECLARE_REGISTERED_CLASS(transcendental_sum_type_B, GiNaC::basic) 00071 00072 // ctors 00073 public: 00074 transcendental_sum_type_B(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr, 00075 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00076 const GiNaC::ex & eps, int o, int f); 00077 00078 // functions overriding virtual functions from base classes 00079 public: 00080 void archive(GiNaC::archive_node &node) const; 00081 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst); 00082 00083 unsigned return_type(void) const { return GiNaC::return_types::noncommutative; } 00084 00085 void print(const GiNaC::print_context & c, unsigned level = 0) const; 00086 unsigned precedence(void) const {return 40;} 00087 GiNaC::ex eval(int level = 0) const; 00088 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const; 00089 00090 protected: 00091 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const; 00092 GiNaC::ex derivative(const GiNaC::symbol & s) const; 00093 unsigned calchash(void) const; 00094 00095 // new virtual functions which can be overridden by derived classes 00096 public: 00097 virtual GiNaC::ex eval_explicit(int level = 0) const; 00098 00099 // non-virtual functions 00100 public: 00101 GiNaC::ex set_expansion(void) const; 00102 GiNaC::ex distribute_over_subsum(void) const; 00103 GiNaC::ex distribute_over_letter(void) const; 00104 GiNaC::ex distribute_over_subsum_rev(void) const; 00105 GiNaC::ex distribute_over_letter_rev(void) const; 00106 GiNaC::ex shift_plus_one(void) const; 00107 GiNaC::ex shift_plus_one_rev(void) const; 00108 00109 protected: 00110 00111 // member variables : 00112 00113 protected: 00114 00115 GiNaC::ex n; 00116 GiNaC::ex index; 00117 GiNaC::ex letter; 00118 GiNaC::ex letter_rev; 00119 GiNaC::ex lst_of_gammas; 00120 GiNaC::ex lst_of_gammas_rev; 00121 GiNaC::ex subsum; 00122 GiNaC::ex subsum_rev; 00123 00124 GiNaC::ex expansion_parameter; 00125 00126 int order; 00127 00128 mutable int flag_expand_status; 00129 }; 00130 00131 GINAC_DECLARE_UNARCHIVER(transcendental_sum_type_B); 00132 00138 inline GiNaC::ex create_transcendental_sum_type_B(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr, 00139 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00140 const GiNaC::ex & eps, int o, int f) 00141 { 00142 return (new transcendental_sum_type_B(nn,i,l,lr,v,vr,ss,ssr,eps,o,f))->setflag(GiNaC::status_flags::dynallocated); 00143 } 00144 00150 inline 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, 00151 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00152 const GiNaC::ex & eps, int o, int f) 00153 { 00154 // set index, expansion_parameter and order in the Gamma functions 00155 GiNaC::ex new_v = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(v).gamma_sequence,i,eps,o); 00156 00157 // set index, expansion_parameter and order in the Gamma functions 00158 GiNaC::ex new_vr = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(vr).gamma_sequence,nn-i,eps,o); 00159 00160 return (new transcendental_sum_type_B(nn,i,l,lr,new_v,new_vr,ss,ssr,eps,o,f))->setflag(GiNaC::status_flags::dynallocated); 00161 } 00162 00163 GiNaC::ex create_transcendental_sum_type_B_and_expand(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & lr, 00164 const GiNaC::ex & v, const GiNaC::ex & vr, const GiNaC::ex & ss, const GiNaC::ex & ssr, 00165 const GiNaC::ex & eps, int o); 00166 00167 } // namespace nestedsums 00168 00169 #endif // ndef __NESTEDSUMS_TRANSCENDENTAL_B_H__

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