Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
Public Member Functions | |
LinearInterpolator (std::vector< double > knots, std::vector< double > coef0, std::vector< double > coef1) | |
virtual | ~LinearInterpolator ()=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 | |
const std::vector< double > | m_coef0 |
const std::vector< double > | m_coef1 |
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 linear.cpp.
|
inline |
Definition at line 35 of file linear.cpp.
|
virtualdefault |
|
inlineprivate |
Definition at line 124 of file linear.cpp.
References m_coef0, and m_coef1.
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 84 of file linear.cpp.
References m_coef0, m_coef1, 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 88 of file linear.cpp.
References antiderivative(), std::vector< T >::begin(), std::vector< T >::end(), Euclid::MathUtils::PiecewiseBase::m_knots, and std::upper_bound().
|
inlineoverride |
Definition at line 51 of file linear.cpp.
References std::vector< T >::begin(), std::array< T >::begin(), std::vector< T >::end(), std::array< T >::end(), std::fill(), std::vector< T >::front(), std::array< T >::front(), std::lower_bound(), m_coef0, m_coef1, Euclid::MathUtils::PiecewiseBase::m_knots, std::vector< T >::resize(), and std::array< T >::size().
Definition at line 40 of file linear.cpp.
References Euclid::MathUtils::PiecewiseBase::findKnot(), std::array< T >::front(), m_coef0, m_coef1, Euclid::MathUtils::PiecewiseBase::m_knots, and std::vector< T >::size().
|
private |
Definition at line 122 of file linear.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().
|
private |
Definition at line 122 of file linear.cpp.
Referenced by antiderivative(), clone(), operator()(), and operator()().