00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef __NESTEDSUMS_Csum_H__
00027
#define __NESTEDSUMS_Csum_H__
00028
00029
#include "ginac/ginac.h"
00030
00031
namespace nestedsums {
00032
00034
00087 class Csum :
public GiNaC::basic
00088 {
00089
00090 GINAC_DECLARE_REGISTERED_CLASS(
Csum, GiNaC::basic)
00091
00092
00093
public:
00094
Csum(
const GiNaC::ex & nc,
const GiNaC::ex & llc);
00095
00096
00097
public:
00098
void archive(GiNaC::archive_node &node)
const;
00099
void read_archive(
const GiNaC::archive_node &node, GiNaC::lst &sym_lst);
00100
00101
unsigned return_type(
void)
const {
return GiNaC::return_types::noncommutative; }
00102
00103
void print(
const GiNaC::print_context & c,
unsigned level = 0)
const;
00104
unsigned precedence(
void)
const {
return 60;}
00105 GiNaC::ex
eval(
int level = 0)
const;
00106 GiNaC::ex subs(
const GiNaC::exmap & m,
unsigned options = 0)
const;
00107
00108
protected:
00109 GiNaC::ex
eval_ncmul(
const GiNaC::exvector & v)
const;
00110 GiNaC::ex derivative(
const GiNaC::symbol & s)
const;
00111
unsigned calchash(
void)
const;
00112
00113
00114
public :
00115
virtual GiNaC::ex
convert_to_Ssum_exvector(
const GiNaC::exvector & Z1)
const;
00116
00117
virtual GiNaC::ex expand_members(
int level = 0)
const;
00118
00119
protected:
00120
virtual GiNaC::ex
decrease_letter_degree(
int m)
const;
00121
virtual GiNaC::ex
move_x0_into_x1(
void)
const;
00122
virtual GiNaC::ex
move_x1_into_x2(
void)
const;
00123
virtual GiNaC::ex
remove_x0(
void)
const;
00124
virtual GiNaC::ex
remove_x0_and_x1(
void)
const;
00125
virtual GiNaC::ex
cast_to_Bsum(
void)
const;
00126
00127
00128
public :
00129 GiNaC::ex
get_index(
void)
const;
00130 GiNaC::ex
get_letter_list(
void)
const;
00131
unsigned get_depth(
void)
const;
00132
00133
00134
friend GiNaC::ex
convert_Csum_to_Ssum(
const GiNaC::ex & C);
00135
friend GiNaC::ex
convert_Csum_to_Zsum(
const GiNaC::ex & C);
00136
00137
00138
00139
protected:
00140
00141 GiNaC::ex n;
00142 GiNaC::ex letter_list;
00143 };
00144
00145 GINAC_DECLARE_UNARCHIVER(
Csum);
00146
00147
00148
00154 inline GiNaC::ex Csum::get_index(
void)
const
00155
{
00156
return n;
00157 }
00158
00164 inline GiNaC::ex Csum::get_letter_list(
void)
const
00165
{
00166
return letter_list;
00167 }
00168
00174 inline unsigned Csum::get_depth(
void)
const
00175
{
00176
return letter_list.nops();
00177 }
00178
00184 inline GiNaC::ex
create_Csum(
const GiNaC::ex & nc,
const GiNaC::ex & llc)
00185 {
00186
return (
new Csum(nc,llc))->setflag(GiNaC::status_flags::dynallocated);
00187 }
00188
00189 GiNaC::ex
create_Csum_from_exvector(
const GiNaC::ex & nc,
const GiNaC::exvector & v);
00190
00191 GiNaC::ex
convert_Csum_to_Ssum(
const GiNaC::ex & C);
00192 GiNaC::ex
convert_Csum_to_Zsum(
const GiNaC::ex & C);
00193
00194 }
00195
00196
#endif // ndef __NESTEDSUMS_Csum_H__