Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
Public Member Functions | |
CubicInterpolator (std::vector< double > knots, std::vector< double > coef0, std::vector< double > coef1, std::vector< double > coef2, std::vector< double > coef3) | |
virtual | ~CubicInterpolator ()=default |
double | operator() (double x) const override |
void | operator() (const std::vector< double > &xs, std::vector< double > &out) const override |
std::unique_ptr< NAryFunction > | clone () const override |
double | integrate (const double a, const double b) const override |
![]() | |
virtual | ~PiecewiseBase ()=default |
const std::vector< double > & | getKnots () const |
Returns the knots of the piecewise function. | |
![]() | |
virtual | ~Integrable ()=default |
Default destructor. | |
Private Member Functions | |
double | antiderivative (int i, double x) const |
Private Attributes | |
std::vector< double > | m_coef0 |
std::vector< double > | m_coef1 |
std::vector< double > | m_coef2 |
std::vector< double > | m_coef3 |
Additional Inherited Members | |
![]() | |
PiecewiseBase (std::vector< double > knots) | |
ssize_t | findKnot (double x) const |
![]() | |
std::vector< double > | m_knots |
A vector where the knots are kept. | |
Definition at line 33 of file spline.cpp.
|
inline |
Definition at line 35 of file spline.cpp.
|
virtualdefault |
Definition at line 133 of file spline.cpp.
References m_coef0, m_coef1, m_coef2, and m_coef3.
Referenced by integrate().
|
inlineoverridevirtual |
Creates a clone of the function object. All subclasses must implement this method, to enable copying of Function objects when only a reference to the Function class is available.
Implements Euclid::MathUtils::NAryFunction< N >.
Definition at line 93 of file spline.cpp.
References m_coef0, m_coef1, m_coef2, m_coef3, and Euclid::MathUtils::PiecewiseBase::m_knots.
|
inlineoverridevirtual |
Calculates the integral of the function in the range [a,b].
a | The lower bound of the integration |
b | The upper bound of the integration |
Implements Euclid::MathUtils::Integrable.
Definition at line 97 of file spline.cpp.
References antiderivative(), std::vector< T >::begin(), std::vector< T >::end(), Euclid::MathUtils::PiecewiseBase::m_knots, and std::upper_bound().
|
inlineoverride |
Definition at line 57 of file spline.cpp.
References std::vector< T >::begin(), std::array< T >::begin(), std::vector< T >::end(), std::array< T >::end(), std::fill(), std::find_if(), std::vector< T >::front(), std::lower_bound(), m_coef0, m_coef1, m_coef2, m_coef3, Euclid::MathUtils::PiecewiseBase::m_knots, std::vector< T >::resize(), and std::array< T >::size().
Definition at line 45 of file spline.cpp.
References Euclid::MathUtils::PiecewiseBase::findKnot(), std::vector< T >::front(), m_coef0, m_coef1, m_coef2, m_coef3, Euclid::MathUtils::PiecewiseBase::m_knots, and std::vector< T >::size().
|
private |
Definition at line 131 of file spline.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().
|
private |
Definition at line 131 of file spline.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().
|
private |
Definition at line 131 of file spline.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().
|
private |
Definition at line 131 of file spline.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().