Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
Represents a piecewise function. More...
#include <Piecewise.h>
Public Member Functions | |
virtual | ~PiecewiseBase ()=default |
const std::vector< double > & | getKnots () const |
Returns the knots of the piecewise function. | |
![]() | |
virtual | ~Integrable ()=default |
Default destructor. | |
virtual double | integrate (const double a, const double b) const =0 |
![]() | |
virtual std::unique_ptr< NAryFunction > | clone () const =0 |
Protected Member Functions | |
PiecewiseBase (std::vector< double > knots) | |
ssize_t | findKnot (double x) const |
Protected Attributes | |
std::vector< double > | m_knots |
A vector where the knots are kept. | |
Represents a piecewise function.
A Piecewise function is defined by multiple sub functions, each applied to an interval defined by the piecewise knots. Outside of the knots range the Piecewise evaluates zero.
Definition at line 48 of file Piecewise.h.
|
virtualdefault |
|
inlineexplicitprotected |
Definition at line 58 of file Piecewise.h.
Definition at line 60 of file Piecewise.h.
References std::array< T >::begin(), std::array< T >::end(), and std::lower_bound().
Referenced by Euclid::MathUtils::Piecewise::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), and Euclid::MathUtils::CubicInterpolator::operator()().
|
inline |
Returns the knots of the piecewise function.
Definition at line 53 of file Piecewise.h.
|
protected |
A vector where the knots are kept.
Definition at line 74 of file Piecewise.h.
Referenced by Euclid::MathUtils::Piecewise::clone(), Euclid::MathUtils::LinearInterpolator::clone(), Euclid::MathUtils::CubicInterpolator::clone(), Euclid::MathUtils::LinearInterpolator::integrate(), Euclid::MathUtils::CubicInterpolator::integrate(), Euclid::MathUtils::Piecewise::integrate(), Euclid::MathUtils::Piecewise::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), Euclid::MathUtils::CubicInterpolator::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), Euclid::MathUtils::CubicInterpolator::operator()(), Euclid::MathUtils::Piecewise::Piecewise(), and Euclid::MathUtils::Piecewise::Piecewise().