26#ifndef __NESTEDSUMS_SSUM_H__
27#define __NESTEDSUMS_SSUM_H__
29#include "ginac/ginac.h"
55 class Ssum :
public GiNaC::basic
63 GINAC_DECLARE_REGISTERED_CLASS(
Ssum, GiNaC::basic)
67 explicit Ssum(
const GiNaC::ex & nc);
68 Ssum(
const GiNaC::ex & nc,
const GiNaC::ex & llc);
72 void archive(GiNaC::archive_node &node)
const override;
73 void read_archive(
const GiNaC::archive_node &node, GiNaC::lst &sym_lst)
override;
75 unsigned return_type(
void)
const override {
return GiNaC::return_types::noncommutative; }
77 void print(
const GiNaC::print_context & c,
unsigned level = 0)
const override;
78 unsigned precedence(
void)
const override {
return 60;}
79 GiNaC::ex
eval()
const override;
80 GiNaC::ex subs(
const GiNaC::exmap & m,
unsigned options = 0)
const override;
83 GiNaC::ex
eval_ncmul(
const GiNaC::exvector & v)
const override;
84 GiNaC::ex derivative(
const GiNaC::symbol & s)
const override;
85 unsigned calchash(
void)
const override;
90 virtual GiNaC::ex
shuffle_exvector(
const GiNaC::exvector & Z0,
const GiNaC::exvector & Z1,
const GiNaC::exvector & Z2)
const;
92 virtual GiNaC::ex
refine_exvector(
unsigned q,
const GiNaC::exvector & Z0,
const GiNaC::exvector & Z1)
const;
93 virtual GiNaC::ex
refine(
unsigned q)
const;
95 virtual GiNaC::ex
set_index(
const GiNaC::ex & i)
const;
103 virtual GiNaC::ex
get_head(
int k)
const;
104 virtual GiNaC::ex
get_tail(
int k)
const;
108 virtual GiNaC::ex expand_members(
int level = 0)
const;
114 virtual GiNaC::ex prepend_letter(
const GiNaC::ex & lc)
const;
115 virtual GiNaC::ex prepend_letter(
const GiNaC::ex & nc,
const GiNaC::ex & lc)
const;
124 virtual GiNaC::ex
concat_two_sums(
const GiNaC::ex & Z1,
const GiNaC::ex & Z2)
const;
134 friend GiNaC::ex shuffle_Ssum(
const GiNaC::ex & Z1,
const GiNaC::ex & Z2);
135 friend GiNaC::ex convert_Ssum_to_Zsum(
const GiNaC::ex & Z1);
136 friend GiNaC::ex remove_trivial_Ssum(
const GiNaC::ex & expr);
143 GiNaC::ex letter_list;
146GINAC_DECLARE_UNARCHIVER(
Ssum);
177 return letter_list.nops();
185inline GiNaC::ex
create_Ssum(
const GiNaC::ex & nc,
const GiNaC::ex & llc)
187 return (
new Ssum(nc,llc))->setflag(GiNaC::status_flags::dynallocated);
190 GiNaC::ex
shuffle_Ssum(
const GiNaC::ex & Z1,
const GiNaC::ex & Z2);
204 GiNaC::ex
refine_Ssum(
const GiNaC::ex & expr,
unsigned q);
Csums involve a conjugation.
Definition Csum.h:88
Ssums form an algebra.
Definition Ssum.h:56
unsigned get_depth(void) const
Definition Ssum.h:175
virtual GiNaC::ex get_first_letter(void) const
Definition Ssum.cc:472
GiNaC::ex get_weight(void) const
Definition Ssum.cc:1130
virtual GiNaC::ex get_tail(int k) const
Definition Ssum.cc:808
virtual GiNaC::ex cast_to_Zsum(void) const
Definition Ssum.cc:632
GiNaC::ex eval_ncmul(const GiNaC::exvector &v) const override
Definition Ssum.cc:206
GiNaC::ex get_letter_list(void) const
Definition Ssum.h:165
virtual GiNaC::ex remove_first_letter(void) const
Definition Ssum.cc:485
virtual GiNaC::ex append_letter_list(const GiNaC::ex &lc) const
Definition Ssum.cc:605
virtual GiNaC::ex eval_explicit() const
Definition Ssum.cc:1095
virtual GiNaC::ex index_eq_one(void) const
Definition Ssum.cc:772
virtual GiNaC::ex concat_two_sums(const GiNaC::ex &Z1, const GiNaC::ex &Z2) const
Definition Ssum.cc:886
virtual GiNaC::ex multiply_letter_with_first_letter(const GiNaC::ex &lc) const
Definition Ssum.cc:861
virtual GiNaC::ex remove_negative_degrees(void) const
Definition Ssum.cc:947
virtual GiNaC::ex shuffle_exvector(const GiNaC::exvector &Z0, const GiNaC::exvector &Z1, const GiNaC::exvector &Z2) const
Definition Ssum.cc:350
virtual GiNaC::ex refine(unsigned q) const
Definition Ssum.cc:461
virtual GiNaC::ex adjust_upper_limit_plus_one(void) const
Definition Ssum.cc:752
virtual GiNaC::ex append_letter(const GiNaC::ex &lc) const
Definition Ssum.cc:581
virtual int flag_remove_negative_degrees(void) const
Definition Ssum.cc:903
GiNaC::ex eval() const override
Definition Ssum.cc:173
GiNaC::ex get_index(void) const
Definition Ssum.h:155
virtual GiNaC::ex shift_plus_one(void) const
Definition Ssum.cc:652
virtual GiNaC::ex shift_minus_one(void) const
Definition Ssum.cc:662
virtual GiNaC::ex set_index(const GiNaC::ex &i) const
Definition Ssum.cc:642
virtual GiNaC::ex refine_exvector(unsigned q, const GiNaC::exvector &Z0, const GiNaC::exvector &Z1) const
Definition Ssum.cc:414
virtual GiNaC::ex get_head(int k) const
Definition Ssum.cc:784
virtual GiNaC::ex adjust_upper_limit_upwards(const GiNaC::ex &i) const
Definition Ssum.cc:723
virtual GiNaC::ex convert_to_Zsum_exvector(const GiNaC::exvector &Z0, const GiNaC::exvector &Z1) const
Definition Ssum.cc:293
virtual GiNaC::ex adjust_upper_limit_downwards(const GiNaC::ex &i) const
Definition Ssum.cc:684
virtual GiNaC::ex multiply_letter_with_last_letter(const GiNaC::ex &lc) const
Definition Ssum.cc:834
Definition basic_letter.cc:35
ex refine_Ssum(const ex &expr, unsigned q)
Definition Ssum.cc:1400
GiNaC::ex create_Ssum(const GiNaC::ex &nc, const GiNaC::ex &llc)
Definition Ssum.h:185
ex remove_negative_degrees_from_Ssum(const ex &expr)
Definition Ssum.cc:1316
ex convert_Ssum_to_Zsum(const ex &Z1)
Definition Ssum.cc:1196
ex remove_trivial_Ssum(const ex &expr)
Definition Ssum.cc:1360
ex create_Ssum_from_exvector(const ex &nc, const exvector &v)
Definition Ssum.cc:1227
ex shift_upper_limit_plus_one_for_Ssum(const ex &expr)
Definition Ssum.cc:1280
ex shuffle_Ssum(const ex &Z1, const ex &Z2)
Definition Ssum.cc:1156
ex Ssum_to_Zsum(const ex &expr)
Definition Ssum.cc:1244