INET Framework for OMNeT++/OMNEST
inet::math::InterpolatorBase< X, Y > Class Template Reference

#include <Interpolators.h>

Inheritance diagram for inet::math::InterpolatorBase< X, Y >:
inet::math::IInterpolator< X, Y > inet::math::CloserInterpolator< X, Y > inet::math::ConstantInterpolatorBase< X, Y > inet::math::LineardbInterpolator< X, Y > inet::math::LinearInterpolator< X, Y > inet::math::AverageInterpolator< X, Y > inet::math::EitherInterpolator< X, Y > inet::math::LeftInterpolator< X, Y > inet::math::MaximumInterpolator< X, Y > inet::math::MinimumInterpolator< X, Y > inet::math::RightInterpolator< X, Y >

Public Member Functions

virtual Y getMin (const X x1, const Y y1, const X x2, const Y y2) const override
 Returns the minimum interpolated value in the closed interval of [x1, x2]. More...
 
virtual Y getMax (const X x1, const Y y1, const X x2, const Y y2) const override
 Returns the maximum interpolated value in the closed interval of [x1, x2]. More...
 
- Public Member Functions inherited from inet::math::IInterpolator< X, Y >
virtual ~IInterpolator ()
 
virtual Y getValue (const X x1, const Y y1, const X x2, const Y y2, const X x) const =0
 Returns the interpolated value for the given x. More...
 
virtual Y getMean (const X x1, const Y y1, const X x2, const Y y2) const =0
 Returns the mean interpolated value in the closed interval of [x1, x2]. More...
 

Member Function Documentation

◆ getMax()

template<typename X , typename Y >
virtual Y inet::math::InterpolatorBase< X, Y >::getMax ( const X  x1,
const Y  y1,
const X  x2,
const Y  y2 
) const
inlineoverridevirtual

Returns the maximum interpolated value in the closed interval of [x1, x2].

Implements inet::math::IInterpolator< X, Y >.

27  {
28  ASSERT(x1 <= x2);
29  return math::maxnan(y1, y2);
30  }

◆ getMin()

template<typename X , typename Y >
virtual Y inet::math::InterpolatorBase< X, Y >::getMin ( const X  x1,
const Y  y1,
const X  x2,
const Y  y2 
) const
inlineoverridevirtual

Returns the minimum interpolated value in the closed interval of [x1, x2].

Implements inet::math::IInterpolator< X, Y >.

22  {
23  ASSERT(x1 <= x2);
24  return math::minnan(y1, y2);
25  }

The documentation for this class was generated from the following file:
inet::math::maxnan
const T maxnan(const T &a, const T &b)
This function properly and symmetrically handles NaNs in contrast with std::max and std::fmax.
Definition: INETMath.h:234
inet::math::minnan
const T minnan(const T &a, const T &b)
This function properly and symmetrically handles NaNs in contrast with std::min and std::fmin.
Definition: INETMath.h:216