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

clamp gate clamps out-of-bounds values. clamp_gate takes four arguments: the lower and upper limit of the gate, and the values which are returned if the input is outside the range: 'lfix' if it is below 'lower' and 'ufix' if it is above 'upper' More...

#include <map.h>

Inheritance diagram for vspline::clamp_gate< rc_type, _vsize >:
vspline::unary_functor< rc_type, rc_type, vspline::vector_traits< rc_type > ::size > vspline::unary_functor_tag< _vsize >

Public Types

typedef vspline::unary_functor< rc_type, rc_type, _vsize > base_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
 
- Public Types inherited from vspline::unary_functor< rc_type, rc_type, vspline::vector_traits< rc_type > ::size >
enum  
 
enum  
 
enum  
 
typedef rc_type in_type
 
typedef rc_type out_type
 
typedef vspline::vector_traits< rc_type >::ele_type in_ele_type
 
typedef vspline::vector_traits< rc_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< rc_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< rc_type, vsize >::ele_v out_ele_v
 
typedef vector_traits< rc_type, vsize >::nd_ele_v in_nd_ele_v
 
typedef vector_traits< rc_type, vsize >::nd_ele_v out_nd_ele_v
 
typedef vector_traits< rc_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< rc_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 Member Functions

 clamp_gate (rc_type _lower, rc_type _upper, rc_type _lfix, rc_type _ufix)
 
 clamp_gate (rc_type _lower, rc_type _upper)
 simplified constructor, gate clamps to _lower and _upper More...
 
void eval (const rc_type &c, rc_type &result) const
 
template<typename = std::enable_if < ( _vsize > 1 ) >>
void eval (const in_v &c, out_v &result) const
 

Public Attributes

const rc_type lower
 
const rc_type upper
 
const rc_type lfix
 
const rc_type ufix
 

Additional Inherited Members

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

Detailed Description

template<typename rc_type, size_t _vsize = vspline::vector_traits < rc_type > :: size>
struct vspline::clamp_gate< rc_type, _vsize >

clamp gate clamps out-of-bounds values. clamp_gate takes four arguments: the lower and upper limit of the gate, and the values which are returned if the input is outside the range: 'lfix' if it is below 'lower' and 'ufix' if it is above 'upper'

Definition at line 178 of file map.h.

Member Typedef Documentation

◆ base_type

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
typedef vspline::unary_functor< rc_type , rc_type , _vsize > vspline::clamp_gate< rc_type, _vsize >::base_type

Definition at line 217 of file map.h.

◆ in_v

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
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.

◆ out_v

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
typedef vector_traits<OUT,vsize>::type vspline::unary_functor< IN, OUT, _vsize >::out_v

Definition at line 255 of file unary_functor.h.

Constructor & Destructor Documentation

◆ clamp_gate() [1/2]

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
vspline::clamp_gate< rc_type, _vsize >::clamp_gate ( rc_type  _lower,
rc_type  _upper,
rc_type  _lfix,
rc_type  _ufix 
)
inline

Definition at line 187 of file map.h.

◆ clamp_gate() [2/2]

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
vspline::clamp_gate< rc_type, _vsize >::clamp_gate ( rc_type  _lower,
rc_type  _upper 
)
inline

simplified constructor, gate clamps to _lower and _upper

Definition at line 201 of file map.h.

Member Function Documentation

◆ eval() [1/2]

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
template<typename = std::enable_if < ( _vsize > 1 ) >>
void vspline::clamp_gate< rc_type, _vsize >::eval ( const in_v c,
out_v result 
) const
inline

Definition at line 223 of file map.h.

◆ eval() [2/2]

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
void vspline::clamp_gate< rc_type, _vsize >::eval ( const rc_type c,
rc_type result 
) const
inline

Definition at line 206 of file map.h.

Member Data Documentation

◆ lfix

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
const rc_type vspline::clamp_gate< rc_type, _vsize >::lfix

Definition at line 184 of file map.h.

◆ lower

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
const rc_type vspline::clamp_gate< rc_type, _vsize >::lower

Definition at line 182 of file map.h.

◆ ufix

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
const rc_type vspline::clamp_gate< rc_type, _vsize >::ufix

Definition at line 185 of file map.h.

◆ upper

template<typename rc_type , size_t _vsize = vspline::vector_traits < rc_type > :: size>
const rc_type vspline::clamp_gate< rc_type, _vsize >::upper

Definition at line 183 of file map.h.


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