Nestedsums library
harmonic_polylog.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_HARMONIC_POLYLOG_H__
27#define __NESTEDSUMS_HARMONIC_POLYLOG_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
34
50 {
51 GINAC_DECLARE_REGISTERED_CLASS(harmonic_polylog, multiple_polylog)
52
53 // ctors
54 public:
55 explicit harmonic_polylog(const GiNaC::ex & llc);
56
57 // functions overriding virtual functions from bases classes
58 public:
59 void archive(GiNaC::archive_node &node) const override;
60 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
61
62 GiNaC::return_type_t return_type_tinfo() const override;
63
64 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
65 GiNaC::ex eval() const override;
66 };
67
68GINAC_DECLARE_UNARCHIVER(harmonic_polylog);
69
75inline GiNaC::ex create_harmonic_polylog(const GiNaC::ex & llc)
76 {
77 return (new harmonic_polylog(llc))->setflag(GiNaC::status_flags::dynallocated);
78 }
79
80} // namespace nestedsums
81
82namespace GiNaC {
83
84 // template specialization
85template<> inline const nestedsums::harmonic_polylog &ex_to<nestedsums::harmonic_polylog>(const ex &e)
86 {
87 return dynamic_cast<const nestedsums::harmonic_polylog &>(*e.bp);
88 }
89
90} // end namespace GiNaC
91
92#endif // ndef __NESTEDSUMS_HARMONIC_POLYLOG_H__
A harmonic polylog is a special case of a multiple polylog.
Definition harmonic_polylog.h:50
GiNaC::ex eval() const override
Definition harmonic_polylog.cc:158
A multiple polylog sum is a special case of a Zsum.
Definition multiple_polylog.h:54
Definition basic_letter.cc:35
GiNaC::ex create_harmonic_polylog(const GiNaC::ex &llc)
Definition harmonic_polylog.h:75