Alexandria 2.32.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. | |
Public Member Functions inherited from Euclid::MathUtils::Integrable | |
virtual | ~Integrable ()=default |
Default destructor. | |
virtual double | integrate (const double a, const double b) const =0 |
Public Member Functions inherited from Euclid::MathUtils::NAryFunction< 1 > | |
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.
References m_knots.
Referenced by Euclid::MathUtils::CubicInterpolator::CubicInterpolator(), Euclid::MathUtils::LinearInterpolator::LinearInterpolator(), Euclid::MathUtils::Piecewise::Piecewise(), and Euclid::MathUtils::Piecewise::Piecewise().
|
inlineprotected |
Definition at line 60 of file Piecewise.h.
References std::lower_bound(), and m_knots.
Referenced by Euclid::MathUtils::CubicInterpolator::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), and Euclid::MathUtils::Piecewise::operator()().
|
inline |
Returns the knots of the piecewise function.
Definition at line 53 of file Piecewise.h.
References m_knots.
|
protected |
A vector where the knots are kept.
Definition at line 74 of file Piecewise.h.
Referenced by Euclid::MathUtils::CubicInterpolator::clone(), Euclid::MathUtils::LinearInterpolator::clone(), Euclid::MathUtils::Piecewise::clone(), findKnot(), getKnots(), Euclid::MathUtils::CubicInterpolator::integrate(), Euclid::MathUtils::LinearInterpolator::integrate(), Euclid::MathUtils::Piecewise::integrate(), Euclid::MathUtils::CubicInterpolator::operator()(), Euclid::MathUtils::CubicInterpolator::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), Euclid::MathUtils::LinearInterpolator::operator()(), Euclid::MathUtils::Piecewise::operator()(), Euclid::MathUtils::Piecewise::Piecewise(), Euclid::MathUtils::Piecewise::Piecewise(), and PiecewiseBase().