File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::functors::Rescaling< TInputType, TOutputType > Struct Template Reference

Aim: Functor allowing to rescale a value. Values of the initial scale [initMin,initMax] are rescaled to the new scale [newMin,newMax]. More...

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

 Rescaling (const TInputType &initMin, const TInputType &initMax, const TOutputType &newMin, const TOutputType &newMax)
TOutputType operator() (const TInputType &anInitVal) const

Data Fields

TInputType myInitMin
TInputType myInitMax
TInputType myInitRange
TOutputType myNewMin
TOutputType myNewMax
TOutputType myNewRange

Detailed Description

template<typename TInputType, typename TOutputType>
struct DGtal::functors::Rescaling< TInputType, TOutputType >

Aim: Functor allowing to rescale a value. Values of the initial scale [initMin,initMax] are rescaled to the new scale [newMin,newMax].

Description of template class 'Rescaling'

Template Parameters
TInputTypethe type of values on the inital scale.
TOutputTypethe type of values on the new scale.

Definition at line 905 of file BasicFunctors.h.

Constructor & Destructor Documentation

◆ Rescaling()

template<typename TInputType, typename TOutputType>
DGtal::functors::Rescaling< TInputType, TOutputType >::Rescaling ( const TInputType & initMin,
const TInputType & initMax,
const TOutputType & newMin,
const TOutputType & newMax )
inline

Constructor.

Parameters
initMinthe minimum value of the initial scale. Lower values are set to this value.
initMaxthe maximum value of the initial scale. Greater values are set to this value.
newMinthe minimum value of the new scale.
newMaxthe maximum value of the new scale.

Definition at line 923 of file BasicFunctors.h.

923 :
Aim: Functor allowing to rescale a value. Values of the initial scale [initMin,initMax] are rescaled ...

References myInitMax, myInitMin, myInitRange, myNewMax, myNewMin, and myNewRange.

Member Function Documentation

◆ operator()()

template<typename TInputType, typename TOutputType>
TOutputType DGtal::functors::Rescaling< TInputType, TOutputType >::operator() ( const TInputType & anInitVal) const
inline

Operator.

Parameters
anInitValvalue of the initial scale.
Returns
value of anInitVal, considered on the initial scale, on the new scale.

Definition at line 934 of file BasicFunctors.h.

References myInitMax, myInitMin, myInitRange, myNewMax, myNewMin, and myNewRange.

Field Documentation

◆ myInitMax

template<typename TInputType, typename TOutputType>
TInputType DGtal::functors::Rescaling< TInputType, TOutputType >::myInitMax

Definition at line 908 of file BasicFunctors.h.

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

◆ myInitMin

template<typename TInputType, typename TOutputType>
TInputType DGtal::functors::Rescaling< TInputType, TOutputType >::myInitMin

Definition at line 907 of file BasicFunctors.h.

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

◆ myInitRange

template<typename TInputType, typename TOutputType>
TInputType DGtal::functors::Rescaling< TInputType, TOutputType >::myInitRange

Definition at line 909 of file BasicFunctors.h.

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

◆ myNewMax

template<typename TInputType, typename TOutputType>
TOutputType DGtal::functors::Rescaling< TInputType, TOutputType >::myNewMax

Definition at line 912 of file BasicFunctors.h.

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

◆ myNewMin

template<typename TInputType, typename TOutputType>
TOutputType DGtal::functors::Rescaling< TInputType, TOutputType >::myNewMin

Definition at line 911 of file BasicFunctors.h.

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

◆ myNewRange

template<typename TInputType, typename TOutputType>
TOutputType DGtal::functors::Rescaling< TInputType, TOutputType >::myNewRange

Definition at line 913 of file BasicFunctors.h.

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


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