GiNaC 1.8.10
integral.h
Go to the documentation of this file.
1
5/*
6 * GiNaC Copyright (C) 1999-2026 Johannes Gutenberg University Mainz, Germany
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef GINAC_INTEGRAL_H
23#define GINAC_INTEGRAL_H
24
25#include "basic.h"
26#include "ex.h"
27#include "archive.h"
28
29namespace GiNaC {
30
32class integral : public basic
33{
35
36 // other constructors
37public:
38 integral(const ex & x_, const ex & a_, const ex & b_, const ex & f_);
39
40 // functions overriding virtual functions from base classes
41public:
42 unsigned precedence() const override {return 45;}
43 ex eval() const override;
44 ex evalf() const override;
45 int degree(const ex & s) const override;
46 int ldegree(const ex & s) const override;
47 ex eval_ncmul(const exvector & v) const override;
48 size_t nops() const override;
49 ex op(size_t i) const override;
50 ex & let_op(size_t i) override;
51 ex expand(unsigned options = 0) const override;
52 exvector get_free_indices() const override;
53 unsigned return_type() const override;
54 return_type_t return_type_tinfo() const override;
55 ex conjugate() const override;
56 ex eval_integ() const override;
58 void archive(archive_node& n) const override;
60 void read_archive(const archive_node& n, lst& syms) override;
61protected:
62 ex derivative(const symbol & s) const override;
63 ex series(const relational & r, int order, unsigned options = 0) const override;
64
65 // new virtual functions which can be overridden by derived classes
66 // none
67
68 // non-virtual functions in this class
69protected:
70 void do_print(const print_context & c, unsigned level) const;
71 void do_print_latex(const print_latex & c, unsigned level) const;
72public:
75private:
80};
82
83// utility functions
84
86 const GiNaC::ex &x,
87 const GiNaC::ex &a,
88 const GiNaC::ex &b,
89 const GiNaC::ex &f,
91);
92
93} // namespace GiNaC
94
95#endif // ndef GINAC_INTEGRAL_H
Archiving of GiNaC expressions.
#define GINAC_DECLARE_UNARCHIVER(classname)
Helper macros to register a class with (un)archiving (a.k.a.
Definition archive.h:218
Interface to GiNaC's ABC.
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
Definition archive.h:48
This class holds archived versions of GiNaC expressions (class ex).
Definition archive.h:254
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Definition basic.h:104
Wrapper template for making GiNaC classes out of STL containers.
Definition container.h:72
Lightweight wrapper for GiNaC's symbolic objects.
Definition ex.h:72
Symbolic integral.
Definition integral.h:33
ex evalf() const override
Evaluate object numerically.
Definition integral.cpp:157
void do_print(const print_context &c, unsigned level) const
Definition integral.cpp:94
static ex relative_integration_error
Definition integral.h:74
ex expand(unsigned options=0) const override
Expand expression, i.e.
Definition integral.cpp:356
unsigned return_type() const override
Definition integral.cpp:405
int degree(const ex &s) const override
Return degree of highest power in object s.
Definition integral.cpp:301
ex eval() const override
Perform automatic non-interruptive term rewriting rules.
Definition integral.cpp:143
size_t nops() const override
Number of operands/members.
Definition integral.cpp:316
ex conjugate() const override
Definition integral.cpp:415
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
Definition integral.h:42
ex eval_integ() const override
Evaluate integrals, if result is known.
Definition integral.cpp:428
ex eval_ncmul(const exvector &v) const override
Definition integral.cpp:311
int ldegree(const ex &s) const override
Return degree of lowest power in object s.
Definition integral.cpp:306
void do_print_latex(const print_latex &c, unsigned level) const
Definition integral.cpp:107
ex & let_op(size_t i) override
Return modifiable operand/member at position i.
Definition integral.cpp:339
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
Definition integral.cpp:72
ex op(size_t i) const override
Return operand/member at position i.
Definition integral.cpp:321
exvector get_free_indices() const override
Return a vector containing the free indices of an expression.
Definition indexed.cpp:516
return_type_t return_type_tinfo() const override
Definition integral.cpp:410
static int max_integration_level
Definition integral.h:73
ex series(const relational &r, int order, unsigned options=0) const override
Default implementation of ex::series().
Definition pseries.cpp:1206
ex derivative(const symbol &s) const override
Default implementation of ex::diff().
Definition integral.cpp:398
Base class for print_contexts.
Definition print.h:101
Context for latex-parsable output.
Definition print.h:121
This class holds a relation consisting of two expressions and a logical relation between them.
Definition relational.h:34
Basic CAS symbol.
Definition symbol.h:38
Interface to GiNaC's light-weight expression handles.
unsigned options
Definition factor.cpp:2473
size_t n
Definition factor.cpp:1431
size_t c
Definition factor.cpp:756
ex x
Definition factor.cpp:1609
size_t r
Definition factor.cpp:756
exset syms
Definition factor.cpp:2427
Definition add.cpp:35
ex adaptivesimpson(const ex &x, const ex &a_in, const ex &b_in, const ex &f, const ex &error)
Numeric integration routine based upon the "Adaptive Quadrature" one in "Numerical Analysis" by Burde...
Definition integral.cpp:218
std::vector< ex > exvector
Definition basic.h:47
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
Definition registrar.h:151
To distinguish between different kinds of non-commutative objects.
Definition registrar.h:42

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.