vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Public Types | Public Member Functions | Public Attributes | List of all members
vspline::amplify_type< _in_type, _out_type, _math_type, _vsize > Struct Template Reference

amplify_type amplifies it's input with a factor. If the data are multi-channel, the factor is multi-channel as well and the channels are amplified by the corresponding elements of the factor. I added this class to make work with integer-valued splines more comfortable - if these splines are prefiltered with 'boost', the effect of the boost has to be reversed at some point, and amplify_type does just that when you use 1/boost as the 'factor'. More...

#include <unary_functor.h>

Inheritance diagram for vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >:
vspline::unary_functor< _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize > vspline::callable< amplify_type< _in_type, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize > vspline::unary_functor_tag< _vsize >

Public Types

enum  { vsize = _vsize }
 
enum  { dimension = base_type::dim_in }
 
typedef vspline::unary_functor< _in_type, _out_type, _vsize > base_type
 
typedef _math_type math_type
 
typedef vigra::ExpandElementResult< math_type >::type math_ele_type
 
typedef vigra::TinyVector< math_ele_type, dimensionmath_nd_ele_type
 
typedef vspline::vector_traits< math_ele_type, vsize >::type math_ele_v
 
typedef IN in_type
 
typedef OUT out_type
 
typedef vector_traits< IN, vsize >::type in_v
 vectorized in_type and out_type. vspline::vector_traits supplies these types so that multidimensional/multichannel data come as vigra::TinyVectors, while 'singular' data won't be made into TinyVectors of one element. More...
 
typedef vector_traits< OUT, vsize >::type out_v
 
typedef vector_traits< IN, vsize >::nd_ele_v in_nd_ele_v
 
typedef vector_traits< OUT, vsize >::nd_ele_v out_nd_ele_v
 
- Public Types inherited from vspline::unary_functor< _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >
enum  
 
enum  
 
enum  
 
typedef _in_type in_type
 
typedef _in_type out_type
 
typedef vspline::vector_traits< _in_type >::ele_type in_ele_type
 
typedef vspline::vector_traits< _in_type >::ele_type out_ele_type
 
typedef vigra::TinyVector< in_ele_type, dim_inin_nd_ele_type
 
typedef vigra::TinyVector< out_ele_type, dim_outout_nd_ele_type
 
typedef vector_traits< _in_type, vsize >::ele_v in_ele_v
 a simdized type of the elementary type of result_type, which is used for coefficients and results. this is fixed via the traits class vector_traits (in vector.h). Note how we derive this type using vsize from the template argument, not what vspline::vector_traits deems appropriate for ele_type - though both numbers will be the same in most cases. More...
 
typedef vector_traits< _in_type, vsize >::ele_v out_ele_v
 
typedef vector_traits< _in_type, vsize >::nd_ele_v in_nd_ele_v
 
typedef vector_traits< _in_type, vsize >::nd_ele_v out_nd_ele_v
 
typedef vector_traits< _in_type, vsize >::type in_v
 vectorized in_type and out_type. vspline::vector_traits supplies these types so that multidimensional/multichannel data come as vigra::TinyVectors, while 'singular' data won't be made into TinyVectors of one element. More...
 
typedef vector_traits< _in_type, vsize >::type out_v
 
typedef vector_traits< int, vsize >::ele_v ic_v
 vsize wide vector of ints, used for gather/scatter indexes More...
 
- Public Types inherited from vspline::callable< amplify_type< _in_type, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >
typedef vector_traits< _in_type, vsize >::type cl_in_v
 
typedef vector_traits< _in_type, vsize >::type cl_out_v
 

Public Member Functions

template<typename = std::enable_if < ( dimension > 1 ) >>
 amplify_type (const math_type &_factor)
 
 amplify_type (const math_ele_type &_factor)
 
void eval (const in_type &in, out_type &out) const
 
template<typename = std::enable_if < ( vsize > 1 ) >>
void eval (const in_v &in, out_v &out) const
 
- Public Member Functions inherited from vspline::callable< amplify_type< _in_type, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >, _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >
_in_type operator() (const _in_type &in) const
 
_in_type operator() (const _in_type &in)
 
cl_out_v operator() (const cl_in_v &in) const
 
cl_out_v operator() (const cl_in_v &in)
 

Public Attributes

const math_type factor
 

Additional Inherited Members

- Static Public Attributes inherited from vspline::unary_functor< _in_type, _in_type, vspline::vector_traits< _in_type > ::vsize >
static const bool has_capped_eval
 

Detailed Description

template<class _in_type, class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
struct vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >

amplify_type amplifies it's input with a factor. If the data are multi-channel, the factor is multi-channel as well and the channels are amplified by the corresponding elements of the factor. I added this class to make work with integer-valued splines more comfortable - if these splines are prefiltered with 'boost', the effect of the boost has to be reversed at some point, and amplify_type does just that when you use 1/boost as the 'factor'.

Definition at line 891 of file unary_functor.h.

Member Typedef Documentation

◆ base_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vspline::unary_functor< _in_type , _out_type , _vsize > vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::base_type

Definition at line 901 of file unary_functor.h.

◆ in_nd_ele_v

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vector_traits<IN,vsize>::nd_ele_v vspline::unary_functor< IN, OUT, _vsize >::in_nd_ele_v

Definition at line 247 of file unary_functor.h.

◆ in_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef IN vspline::unary_functor< IN, OUT, _vsize >::in_type

Definition at line 208 of file unary_functor.h.

◆ in_v

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vector_traits<IN,vsize>::type vspline::unary_functor< IN, OUT, _vsize >::in_v

vectorized in_type and out_type. vspline::vector_traits supplies these types so that multidimensional/multichannel data come as vigra::TinyVectors, while 'singular' data won't be made into TinyVectors of one element.

Definition at line 254 of file unary_functor.h.

◆ math_ele_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vigra::ExpandElementResult<math_type>::type vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::math_ele_type

Definition at line 918 of file unary_functor.h.

◆ math_ele_v

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vspline::vector_traits<math_ele_type,vsize>::type vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::math_ele_v

Definition at line 923 of file unary_functor.h.

◆ math_nd_ele_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vigra::TinyVector< math_ele_type , dimension > vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::math_nd_ele_type

Definition at line 920 of file unary_functor.h.

◆ math_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef _math_type vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::math_type

Definition at line 915 of file unary_functor.h.

◆ out_nd_ele_v

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vector_traits<OUT,vsize>::nd_ele_v vspline::unary_functor< IN, OUT, _vsize >::out_nd_ele_v

Definition at line 248 of file unary_functor.h.

◆ out_type

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef OUT vspline::unary_functor< IN, OUT, _vsize >::out_type

Definition at line 209 of file unary_functor.h.

◆ out_v

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
typedef vector_traits<OUT,vsize>::type vspline::unary_functor< IN, OUT, _vsize >::out_v

Definition at line 255 of file unary_functor.h.

Member Enumeration Documentation

◆ anonymous enum

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
anonymous enum
Enumerator
vsize 

Definition at line 903 of file unary_functor.h.

◆ anonymous enum

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
anonymous enum
Enumerator
dimension 

Definition at line 904 of file unary_functor.h.

Constructor & Destructor Documentation

◆ amplify_type() [1/2]

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
template<typename = std::enable_if < ( dimension > 1 ) >>
vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::amplify_type ( const math_type _factor)
inline

Definition at line 932 of file unary_functor.h.

◆ amplify_type() [2/2]

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::amplify_type ( const math_ele_type _factor)
inline

Definition at line 936 of file unary_functor.h.

Member Function Documentation

◆ eval() [1/2]

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
void vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::eval ( const in_type in,
out_type out 
) const
inline

Definition at line 940 of file unary_functor.h.

◆ eval() [2/2]

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
template<typename = std::enable_if < ( vsize > 1 ) >>
void vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::eval ( const in_v in,
out_v out 
) const
inline

Definition at line 946 of file unary_functor.h.

Member Data Documentation

◆ factor

template<class _in_type , class _out_type = _in_type, class _math_type = _in_type, size_t _vsize = vspline::vector_traits < _in_type > :: vsize>
const math_type vspline::amplify_type< _in_type, _out_type, _math_type, _vsize >::factor

Definition at line 925 of file unary_functor.h.


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