GiNaC 1.8.7
fderivative.h
Go to the documentation of this file.
1
5/*
6 * GiNaC Copyright (C) 1999-2023 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, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef GINAC_FDERIVATIVE_H
24#define GINAC_FDERIVATIVE_H
25
26#include "function.h"
27
28#include <set>
29
30namespace GiNaC {
31
32typedef std::multiset<unsigned> paramset;
33
37class fderivative : public function
38{
40
41 // other constructors
42public:
48 fderivative(unsigned ser, unsigned param, const exvector & args);
49
55 fderivative(unsigned ser, const paramset & params, const exvector & args);
56
57 // internal constructors
58 fderivative(unsigned ser, const paramset & params, exvector && v);
59
60 // functions overriding virtual functions from base classes
61public:
62 void print(const print_context & c, unsigned level = 0) const override;
63 ex eval() const override;
64 ex series(const relational & r, int order, unsigned options = 0) const override;
65 ex thiscontainer(const exvector & v) const override;
66 ex thiscontainer(exvector && v) const override;
67 void archive(archive_node& n) const override;
68 void read_archive(const archive_node& n, lst& syms) override;
69protected:
70 ex derivative(const symbol & s) const override;
71 bool is_equal_same_type(const basic & other) const override;
72 bool match_same_type(const basic & other) const override;
73
74 // non-virtual functions in this class
75public:
76 const paramset& derivatives() const;
77protected:
78 void do_print(const print_context & c, unsigned level) const;
79 void do_print_latex(const print_context & c, unsigned level) const;
80 void do_print_csrc(const print_csrc & c, unsigned level) const;
81 void do_print_tree(const print_tree & c, unsigned level) const;
82
83 // member variables
84protected:
86};
88
89} // namespace GiNaC
90
91#endif // ndef GINAC_DERIVATIVE_H
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
Definition: archive.h:49
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Definition: basic.h:105
Wrapper template for making GiNaC classes out of STL containers.
Definition: container.h:73
Lightweight wrapper for GiNaC's symbolic objects.
Definition: ex.h:72
This class represents the (abstract) derivative of a symbolic function.
Definition: fderivative.h:38
void do_print_latex(const print_context &c, unsigned level) const
const paramset & derivatives() const
Expose this object's derivative structure.
void do_print(const print_context &c, unsigned level) const
ex derivative(const symbol &s) const override
Implementation of ex::diff() for derivatives.
bool match_same_type(const basic &other) const override
Returns true if the attributes of two objects are similar enough for a match.
ex series(const relational &r, int order, unsigned options=0) const override
The series expansion of derivatives falls back to Taylor expansion.
ex thiscontainer(const exvector &v) const override
fderivative(unsigned ser, unsigned param, const exvector &args)
Construct derivative with respect to one parameter.
Definition: fderivative.cpp:50
void do_print_tree(const print_tree &c, unsigned level) const
ex eval() const override
Perform automatic non-interruptive term rewriting rules.
bool is_equal_same_type(const basic &other) const override
Returns true if two objects of same type are equal.
paramset parameter_set
Set of parameter numbers with respect to which to take the derivative.
Definition: fderivative.h:85
void do_print_csrc(const print_csrc &c, unsigned level) const
void print(const print_context &c, unsigned level=0) const override
Output to stream.
Definition: fderivative.cpp:97
void archive(archive_node &n) const override
Archive the object.
Definition: fderivative.cpp:82
void read_archive(const archive_node &n, lst &syms) override
Load (deserialize) the object from an archive node.
Definition: fderivative.cpp:67
The class function is used to implement builtin functions like sin, cos... and user defined functions...
Definition: function.h:674
Base class for print_contexts.
Definition: print.h:103
Base context for C source output.
Definition: print.h:158
Context for tree-like output for debugging.
Definition: print.h:147
This class holds a relation consisting of two expressions and a logical relation between them.
Definition: relational.h:35
Basic CAS symbol.
Definition: symbol.h:39
unsigned options
Definition: factor.cpp:2475
size_t n
Definition: factor.cpp:1432
size_t c
Definition: factor.cpp:757
size_t r
Definition: factor.cpp:757
exset syms
Definition: factor.cpp:2429
Interface to class of symbolic functions.
int order
Definition: add.cpp:38
std::multiset< unsigned > paramset
Definition: fderivative.h:32
GINAC_DECLARE_UNARCHIVER(add)
std::vector< ex > exvector
Definition: basic.h:48
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
Definition: registrar.h:153

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