Nestedsums library
Euler_Zagier_sum.h
Go to the documentation of this file.
1
8/*
9 * Copyright (C) 2001-2017 Stefan Weinzierl
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26#ifndef __NESTEDSUMS_EULER_ZAGIER_SUM_H__
27#define __NESTEDSUMS_EULER_ZAGIER_SUM_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
34
47 class Euler_Zagier_sum : public virtual Zsum
48 {
49 GINAC_DECLARE_REGISTERED_CLASS(Euler_Zagier_sum, Zsum)
50
51 // ctors
52 public:
53 explicit Euler_Zagier_sum(const GiNaC::ex & nc);
54 Euler_Zagier_sum(const GiNaC::ex & nc, const GiNaC::ex & llc);
55
56 // functions overriding virtual functions from bases classes
57 public:
58 void archive(GiNaC::archive_node &node) const override;
59 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
60
61 GiNaC::return_type_t return_type_tinfo() const override;
62
63 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
64 GiNaC::ex eval() const override;
65
66 GiNaC::ex convert_to_Ssum_exvector(const GiNaC::exvector & Z0, const GiNaC::exvector & Z1) const override;
67 GiNaC::ex shuffle_exvector(const GiNaC::exvector & Z0, const GiNaC::exvector & Z1, const GiNaC::exvector & Z2) const override;
68
69 GiNaC::ex set_index(const GiNaC::ex & i) const override;
70 GiNaC::ex shift_plus_one(void) const override;
71 GiNaC::ex shift_minus_one(void) const override;
72 GiNaC::ex adjust_upper_limit_downwards(const GiNaC::ex & i) const override;
73 GiNaC::ex adjust_upper_limit_upwards(const GiNaC::ex & i) const override;
74 GiNaC::ex adjust_upper_limit_plus_one(void) const override;
75 GiNaC::ex remove_first_letter(void) const override;
76 GiNaC::ex remove_first_letter(const GiNaC::ex & nc) const override;
77 };
78
79GINAC_DECLARE_UNARCHIVER(Euler_Zagier_sum);
80
86inline GiNaC::ex create_Euler_Zagier_sum(const GiNaC::ex & nc, const GiNaC::ex & llc)
87 {
88 return (new Euler_Zagier_sum(nc,llc))->setflag(GiNaC::status_flags::dynallocated);
89 }
90
91 GiNaC::ex create_Euler_Zagier_sum_with_ones(const GiNaC::ex &n, const int &k);
92
93 GiNaC::ex create_Euler_Zagier_sum_from_exvector(const GiNaC::ex & nc, const GiNaC::exvector & v);
94
95} // namespace nestedsums
96
97namespace GiNaC {
98
99 // template specialization
100template<> inline const nestedsums::Euler_Zagier_sum &ex_to<nestedsums::Euler_Zagier_sum>(const ex &e)
101 {
102 return dynamic_cast<const nestedsums::Euler_Zagier_sum &>(*e.bp);
103 }
104
105} // end namespace GiNaC
106
107#endif // ndef __NESTEDSUMS_EULER_ZAGIER_SUM_H__
A Euler-Zagier sum is a special case of a Zsum.
Definition Euler_Zagier_sum.h:48
GiNaC::ex shift_plus_one(void) const override
Definition Euler_Zagier_sum.cc:283
GiNaC::ex shift_minus_one(void) const override
Definition Euler_Zagier_sum.cc:293
GiNaC::ex convert_to_Ssum_exvector(const GiNaC::exvector &Z0, const GiNaC::exvector &Z1) const override
Definition Euler_Zagier_sum.cc:178
GiNaC::ex remove_first_letter(void) const override
Definition Euler_Zagier_sum.cc:393
GiNaC::ex adjust_upper_limit_upwards(const GiNaC::ex &i) const override
Definition Euler_Zagier_sum.cc:352
GiNaC::ex eval() const override
Definition Euler_Zagier_sum.cc:157
GiNaC::ex adjust_upper_limit_downwards(const GiNaC::ex &i) const override
Definition Euler_Zagier_sum.cc:315
GiNaC::ex set_index(const GiNaC::ex &i) const override
Definition Euler_Zagier_sum.cc:273
GiNaC::ex shuffle_exvector(const GiNaC::exvector &Z0, const GiNaC::exvector &Z1, const GiNaC::exvector &Z2) const override
Definition Euler_Zagier_sum.cc:223
GiNaC::ex adjust_upper_limit_plus_one(void) const override
Definition Euler_Zagier_sum.cc:378
Zsums form a Hopf algebra.
Definition Zsum.h:54
Definition basic_letter.cc:35
ex create_Euler_Zagier_sum_with_ones(const ex &n, const int &k)
Definition Euler_Zagier_sum.cc:443
GiNaC::ex create_Euler_Zagier_sum(const GiNaC::ex &nc, const GiNaC::ex &llc)
Definition Euler_Zagier_sum.h:86
ex create_Euler_Zagier_sum_from_exvector(const ex &nc, const exvector &v)
Definition Euler_Zagier_sum.cc:462