Alexandria
2.14.1
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
MathUtils
MathUtils
function
Polynomial.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012-2020 Euclid Science Ground Segment
3
*
4
* This library is free software; you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License as published by the Free
6
* Software Foundation; either version 3.0 of the License, or (at your option)
7
* any later version.
8
*
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this library; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
25
#ifndef MATHUTILS_POLYNOMIAL_H
26
#define MATHUTILS_POLYNOMIAL_H
27
28
#include <vector>
29
30
#include "
ElementsKernel/Export.h
"
31
32
#include "
MathUtils/function/Function.h
"
33
#include "
MathUtils/function/Differentiable.h
"
34
35
namespace
Euclid {
36
namespace
MathUtils {
37
43
class
ELEMENTS_API
Polynomial
:
public
Differentiable
{
44
45
public
:
46
54
Polynomial
(
std::vector<double>
coefficients);
55
57
virtual
~
Polynomial
() =
default
;
58
60
const
std::vector<double>
& getCoefficients()
const
;
61
63
double
operator()(
const
double
)
const override
;
64
66
std::unique_ptr<Function>
clone()
const override
;
67
69
std::shared_ptr<Function>
derivative()
const override
;
70
72
std::shared_ptr<Function>
indefiniteIntegral()
const override
;
73
74
private
:
75
77
std::vector<double>
m_coef
;
79
mutable
std::shared_ptr<Function>
m_derivative {};
81
mutable
std::shared_ptr<Function>
m_indefIntegral {};
82
83
};
// End of Polynomial
84
85
}
// End of MathUtils
86
}
// end of namespace Euclid
87
88
#endif
/* MATHUTILS_POLYNOMIAL_H */
89
std::shared_ptr
Differentiable.h
Euclid::MathUtils::Polynomial::m_coef
std::vector< double > m_coef
The vector where the polynomial coefficients are stored.
Definition:
Polynomial.h:77
Euclid::MathUtils::Differentiable
Interface representing a differentiable function.
Definition:
Differentiable.h:49
Euclid::MathUtils::Polynomial
Represents a polynomial function.
Definition:
Polynomial.h:43
Export.h
ELEMENTS_API
#define ELEMENTS_API
std::vector< double >
std::unique_ptr
STL class.
Function.h
Generated by
1.8.5