npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::LinearMapper1dTmpl< Numeric > Class Template Reference

#include <LinearMapper1d.hh>

Public Member Functions

 LinearMapper1dTmpl ()
 
 LinearMapper1dTmpl (const Numeric x0, const Numeric y0, const Numeric x1, const Numeric y1)
 
 LinearMapper1dTmpl (const Numeric ca, const Numeric cb)
 
Numeric operator() (const Numeric &x) const
 
Numeric a () const
 
Numeric b () const
 
LinearMapper1dTmpl inverse () const
 
LinearMapper1dTmpl operator* (const LinearMapper1dTmpl &r) const
 

Detailed Description

template<class Numeric>
class npstat::LinearMapper1dTmpl< Numeric >

Functor which performs linear mapping in 1-d

Constructor & Destructor Documentation

◆ LinearMapper1dTmpl() [1/3]

template<class Numeric >
npstat::LinearMapper1dTmpl< Numeric >::LinearMapper1dTmpl ( )
inline

Default constructor builds an identity transformation

◆ LinearMapper1dTmpl() [2/3]

template<class Numeric >
npstat::LinearMapper1dTmpl< Numeric >::LinearMapper1dTmpl ( const Numeric  x0,
const Numeric  y0,
const Numeric  x1,
const Numeric  y1 
)
inline

Transform definition from two points. The point at x0 is mapped into y0, the point at x1 is mapped into y1. The linear transformation is thus fully defined.

◆ LinearMapper1dTmpl() [3/3]

template<class Numeric >
npstat::LinearMapper1dTmpl< Numeric >::LinearMapper1dTmpl ( const Numeric  ca,
const Numeric  cb 
)
inline

Explicitly provide the transform coefficients as in y = ca*x + cb

Member Function Documentation

◆ a()

template<class Numeric >
Numeric npstat::LinearMapper1dTmpl< Numeric >::a ( ) const
inline

Get the linear coefficient of the transform

◆ b()

template<class Numeric >
Numeric npstat::LinearMapper1dTmpl< Numeric >::b ( ) const
inline

Get the transform constant

◆ inverse()

template<class Numeric >
LinearMapper1dTmpl npstat::LinearMapper1dTmpl< Numeric >::inverse ( ) const
inline

Create the inverse transform

◆ operator()()

template<class Numeric >
Numeric npstat::LinearMapper1dTmpl< Numeric >::operator() ( const Numeric &  x) const
inline

Perform the transformation

◆ operator*()

template<class Numeric >
LinearMapper1dTmpl npstat::LinearMapper1dTmpl< Numeric >::operator* ( const LinearMapper1dTmpl< Numeric > &  r) const
inline

Sequence of two transforms: the one on the right is applied first


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