ProteoWizard
Public Member Functions | List of all members
ralab::base::base::utilities::CosineInterpolate< TReal > Struct Template Reference

CosineInterpolate Functor Linear interpolation results in discontinuities at each point. More...

#include <interpolation.hpp>

Public Member Functions

TReal operator() (TReal y1, TReal y2, TReal mu)
 operator More...
 

Detailed Description

template<typename TReal>
struct ralab::base::base::utilities::CosineInterpolate< TReal >

CosineInterpolate Functor Linear interpolation results in discontinuities at each point.

Often a smoother interpolating function is desirable, perhaps the simplest is cosine interpolation. A suitable orientated piece of a cosine function serves to provide a smooth transition between adjacent segments.

Definition at line 69 of file interpolation.hpp.

Member Function Documentation

§ operator()()

template<typename TReal>
TReal ralab::base::base::utilities::CosineInterpolate< TReal >::operator() ( TReal  y1,
TReal  y2,
TReal  mu 
)
inline

operator

Parameters
y1y1
y2y2
mulocation parameter in [0.,1.]

Definition at line 72 of file interpolation.hpp.

References ralab::constants::PI().

77  {
78  TReal mu2;
79  mu2 = (1. - cos(mu* ralab::constants::PI))/2;
80  return(y1*( 1. -mu2 )+y2*mu2);
81  }
const double PI(3.14159265358979323846264338327950288)
the ratio of the circumference of a circle to its diameter;

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