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

transcendental_C.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_C_H__ 00027 #define __NESTEDSUMS_TRANSCENDENTAL_C_H__ 00028 00029 #include "ginac/ginac.h" 00030 00031 namespace nestedsums { 00032 00034 00059 class transcendental_sum_type_C : public GiNaC::basic 00060 { 00061 GINAC_DECLARE_REGISTERED_CLASS(transcendental_sum_type_C, GiNaC::basic) 00062 00063 // ctors 00064 public: 00065 transcendental_sum_type_C(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, const GiNaC::ex & v, const GiNaC::ex & ss, 00066 const GiNaC::ex & eps, int o, int f); 00067 00068 // functions overriding virtual functions from base classes 00069 public: 00070 void archive(GiNaC::archive_node &node) const; 00071 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst); 00072 00073 unsigned return_type(void) const { return GiNaC::return_types::noncommutative; } 00074 00075 void print(const GiNaC::print_context & c, unsigned level = 0) const; 00076 unsigned precedence(void) const {return 40;} 00077 GiNaC::ex eval(int level = 0) const; 00078 GiNaC::ex subs(const GiNaC::exmap & m, unsigned options = 0) const; 00079 00080 protected: 00081 GiNaC::ex eval_ncmul(const GiNaC::exvector & v) const; 00082 GiNaC::ex derivative(const GiNaC::symbol & s) const; 00083 unsigned calchash(void) const; 00084 00085 // new virtual functions which can be overridden by derived classes 00086 public: 00087 virtual GiNaC::ex eval_explicit(int level = 0) const; 00088 virtual unsigned get_key(void) const; 00089 virtual GiNaC::ex hash_data(void) const; 00090 virtual GiNaC::ex subst_data(void) const; 00091 00092 // non-virtual functions 00093 public: 00094 GiNaC::ex set_expansion(void) const; 00095 GiNaC::ex distribute_over_subsum(void) const; 00096 GiNaC::ex distribute_over_letter(void) const; 00097 GiNaC::ex shift_plus_one(void) const; 00098 GiNaC::ex shift_minus_one(void) const; 00099 00100 protected: 00101 00102 // member variables : 00103 00104 protected: 00105 00106 GiNaC::ex n; 00107 GiNaC::ex index; 00108 GiNaC::ex letter; 00109 GiNaC::ex lst_of_gammas; 00110 GiNaC::ex subsum; 00111 00112 GiNaC::ex expansion_parameter; 00113 00114 int order; 00115 00116 mutable int flag_expand_status; 00117 }; 00118 00119 GINAC_DECLARE_UNARCHIVER(transcendental_sum_type_C); 00120 00126 inline 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, 00127 const GiNaC::ex & eps, int o, int f) 00128 { 00129 return (new transcendental_sum_type_C(nn,i,l,v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated); 00130 } 00131 00137 inline GiNaC::ex create_transcendental_sum_type_C_and_set_gammas(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, 00138 const GiNaC::ex & v, const GiNaC::ex & ss, 00139 const GiNaC::ex & eps, int o, int f) 00140 { 00141 // set index, expansion_parameter and order in the Gamma functions 00142 GiNaC::ex new_v = create_list_of_tgamma_and_set_gammas(GiNaC::ex_to<list_of_tgamma>(v).gamma_sequence,i,eps,o); 00143 00144 return (new transcendental_sum_type_C(nn,i,l,new_v,ss,eps,o,f))->setflag(GiNaC::status_flags::dynallocated); 00145 } 00146 00147 GiNaC::ex create_transcendental_sum_type_C_and_expand(const GiNaC::ex & nn, const GiNaC::ex & i, const GiNaC::ex & l, 00148 const GiNaC::ex & v, const GiNaC::ex & ss, 00149 const GiNaC::ex & eps, int o); 00150 00151 } // namespace nestedsums 00152 00153 #endif // ndef __NESTEDSUMS_TRANSCENDENTAL_C_H__

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