Nestedsums library
letter.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_LETTER_H__
27#define __NESTEDSUMS_LETTER_H__
28
29#include "ginac/ginac.h"
30
31namespace nestedsums {
32
34
44 class letter : public basic_letter
45 {
46
47 GINAC_DECLARE_REGISTERED_CLASS(letter, basic_letter)
48
49 // ctors
50 public:
51 letter(const GiNaC::ex & l, const GiNaC::ex & d);
52 letter(const GiNaC::ex & l, const GiNaC::ex & d, const GiNaC::ex & i);
53
54 // functions overriding virtual functions from base classes
55 public:
56 void archive(GiNaC::archive_node &node) const override;
57 void read_archive(const GiNaC::archive_node &node, GiNaC::lst &sym_lst) override;
58
59 GiNaC::return_type_t return_type_tinfo() const override;
60
61 void print(const GiNaC::print_context & c, unsigned level = 0) const override;
62 GiNaC::ex eval() const override;
63
64 GiNaC::ex concat_speedy(const GiNaC::ex & l) const override;
65 };
66
67GINAC_DECLARE_UNARCHIVER(letter);
68
74inline GiNaC::ex create_letter(const GiNaC::ex & l, const GiNaC::ex & d)
75 {
76 return (new letter(l,d))->setflag(GiNaC::status_flags::dynallocated);
77 }
78
84inline GiNaC::ex create_letter(const GiNaC::ex & l, const GiNaC::ex & d, const GiNaC::ex & i)
85 {
86 return (new letter(l,d,i))->setflag(GiNaC::status_flags::dynallocated);
87 }
88
89} // namespace nestedsums
90
91#endif // ndef __NESTEDSUMS_LETTER_H__
A basic_letter is an element of an alphabet.
Definition basic_letter.h:50
A letter is a basic_letter with offset=0.
Definition letter.h:45
GiNaC::ex concat_speedy(const GiNaC::ex &l) const override
Definition letter.cc:155
GiNaC::ex eval() const override
Definition letter.cc:130
Definition basic_letter.cc:35
GiNaC::ex create_letter(const GiNaC::ex &l, const GiNaC::ex &d)
Definition letter.h:74