00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef __NESTEDSUMS_Bsum_H__
00027
#define __NESTEDSUMS_Bsum_H__
00028
00029
#include "ginac/ginac.h"
00030
00031
namespace nestedsums {
00032
00034
00059 class Bsum :
public GiNaC::basic
00060 {
00061
00062 GINAC_DECLARE_REGISTERED_CLASS(
Bsum, GiNaC::basic)
00063
00064
00065
public:
00066
Bsum(
const GiNaC::ex & nc,
const GiNaC::ex & llc);
00067
00068
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 60;}
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
00086
public :
00087
virtual GiNaC::ex
convert_to_Ssum_exvector(
const GiNaC::exvector & Z1)
const;
00088
00089
virtual GiNaC::ex expand_members(
int level = 0)
const;
00090
00091
00092
public :
00093 GiNaC::ex
get_index(
void)
const;
00094 GiNaC::ex
get_letter_list(
void)
const;
00095
unsigned get_depth(
void)
const;
00096
00097
protected:
00098
00099
00100
friend GiNaC::ex
convert_Bsum_to_Ssum(
const GiNaC::ex & C);
00101
friend GiNaC::ex
convert_Bsum_to_Zsum(
const GiNaC::ex & C);
00102
00103
00104
00105
protected:
00106
00107 GiNaC::ex n;
00108 GiNaC::ex letter_list;
00109 };
00110
00111 GINAC_DECLARE_UNARCHIVER(
Bsum);
00112
00113
00114
00120 inline GiNaC::ex Bsum::get_index(
void)
const
00121
{
00122
return n;
00123 }
00124
00130 inline GiNaC::ex Bsum::get_letter_list(
void)
const
00131
{
00132
return letter_list;
00133 }
00134
00140 inline unsigned Bsum::get_depth(
void)
const
00141
{
00142
return letter_list.nops();
00143 }
00144
00150 inline GiNaC::ex
create_Bsum(
const GiNaC::ex & nc,
const GiNaC::ex & llc)
00151 {
00152
return (
new Bsum(nc,llc))->setflag(GiNaC::status_flags::dynallocated);
00153 }
00154
00155 GiNaC::ex
create_Bsum_from_exvector(
const GiNaC::ex & nc,
const GiNaC::exvector & v);
00156
00157 GiNaC::ex
convert_Bsum_to_Ssum(
const GiNaC::ex & C);
00158 GiNaC::ex
convert_Bsum_to_Zsum(
const GiNaC::ex & C);
00159
00160 }
00161
00162
#endif // ndef __NESTEDSUMS_Bsum_H__