OGS
ParameterLib::CurveWrapper Struct Reference

Detailed Description

Wrapper for curve interpolation to be used with exprtk. Converts MathLib::PiecewiseLinearInterpolation to an exprtk function interface.

Definition at line 23 of file ExprtkUtils.h.

#include <ExprtkUtils.h>

Inheritance diagram for ParameterLib::CurveWrapper:
[legend]
Collaboration diagram for ParameterLib::CurveWrapper:
[legend]

Public Member Functions

 CurveWrapper (MathLib::PiecewiseLinearInterpolation const &curve)
double operator() (double const &t) override

Private Attributes

MathLib::PiecewiseLinearInterpolation const & curve_

Constructor & Destructor Documentation

◆ CurveWrapper()

ParameterLib::CurveWrapper::CurveWrapper ( MathLib::PiecewiseLinearInterpolation const & curve)
inlineexplicit

Definition at line 25 of file ExprtkUtils.h.

26 : exprtk::ifunction<double>(1), curve_(curve)
27 {
28 exprtk::disable_has_side_effects(*this);
29 }
MathLib::PiecewiseLinearInterpolation const & curve_
Definition ExprtkUtils.h:34

References curve_.

Member Function Documentation

◆ operator()()

double ParameterLib::CurveWrapper::operator() ( double const & t)
inlineoverride

Definition at line 31 of file ExprtkUtils.h.

31{ return curve_.getValue(t); }

References curve_.

Member Data Documentation

◆ curve_

MathLib::PiecewiseLinearInterpolation const& ParameterLib::CurveWrapper::curve_
private

Definition at line 34 of file ExprtkUtils.h.

Referenced by CurveWrapper(), and operator()().


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