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

Interpolation that can only be used if y1 == y2. More...

#include <Interpolators.h>

Inheritance diagram for inet::math::EitherInterpolator< X, Y >:
inet::math::ConstantInterpolatorBase< X, Y > inet::math::InterpolatorBase< X, Y > inet::math::IInterpolator< X, Y >

Public Member Functions

virtual Y getValue (const X x1, const Y y1, const X x2, const Y y2, const X x) const override
 Returns the interpolated value for the given x. More...
 
- Public Member Functions inherited from inet::math::InterpolatorBase< X, Y >
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 ()
 

Static Public Attributes

static EitherInterpolator< X, Y > singleton
 

Detailed Description

template<typename X, typename Y>
class inet::math::EitherInterpolator< X, Y >

Interpolation that can only be used if y1 == y2.

Member Function Documentation

◆ getValue()

template<typename X , typename Y >
virtual Y inet::math::EitherInterpolator< X, Y >::getValue ( const X  x1,
const Y  y1,
const X  x2,
const Y  y2,
const X  x 
) const
inlineoverridevirtual

Returns the interpolated value for the given x.

The value of x must fall into the closed interval [x1, x2].

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

54  {
55  ASSERT(x1 <= x && x <= x2);
56  ASSERT(y1 == y2);
57  return y1;
58  }

Member Data Documentation

◆ singleton

template<typename X , typename Y >
EitherInterpolator< X, Y > inet::math::EitherInterpolator< X, Y >::singleton
static

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