Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Euclid::MathUtils::PiecewiseBase Class Reference

Represents a piecewise function. More...

#include <Piecewise.h>

Inheritance diagram for Euclid::MathUtils::PiecewiseBase:
Inheritance graph
[legend]
Collaboration diagram for Euclid::MathUtils::PiecewiseBase:
Collaboration graph
[legend]

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< N >
virtual std::unique_ptr< NAryFunctionclone () const =0
 

Protected Member Functions

 PiecewiseBase (std::vector< double > knots)
 
ssize_t findKnot (double x) const
 

Protected Attributes

std::vector< doublem_knots
 A vector where the knots are kept.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~PiecewiseBase()

virtual Euclid::MathUtils::PiecewiseBase::~PiecewiseBase ( )
virtualdefault

◆ PiecewiseBase()

Euclid::MathUtils::PiecewiseBase::PiecewiseBase ( std::vector< double knots)
inlineexplicitprotected

Definition at line 58 of file Piecewise.h.

Member Function Documentation

◆ findKnot()

ssize_t Euclid::MathUtils::PiecewiseBase::findKnot ( double  x) const
inlineprotected

◆ getKnots()

const std::vector< double > & Euclid::MathUtils::PiecewiseBase::getKnots ( ) const
inline

Returns the knots of the piecewise function.

Definition at line 53 of file Piecewise.h.

Member Data Documentation

◆ m_knots

std::vector<double> Euclid::MathUtils::PiecewiseBase::m_knots
protected

The documentation for this class was generated from the following file: