Public Types | Public Member Functions | Public Attributes

mln::fun::v2v::linear< V, T, R > Struct Template Reference

Linear function. f(v) = a * v + b. V is the type of input values; T is the type used to compute the result; R is the result type. More...

#include <linear.hh>

Inheritance diagram for mln::fun::v2v::linear< V, T, R >:
Inheritance graph

List of all members.

Public Types

typedef Function_v2v< void > category
typedef linear< V, T, R > exact_t
typedef void mutable_result
typedef R result

Public Member Functions

 linear (T a, T b)
operator() (const V &v) const
template<typename U >
operator() (const U &u) const

Public Attributes

T a
T b

Detailed Description

template<typename V, typename T = V, typename R = T>
struct mln::fun::v2v::linear< V, T, R >

Linear function. f(v) = a * v + b. V is the type of input values; T is the type used to compute the result; R is the result type.

By defaut, T is V and R is T.

Definition at line 55 of file v2v/linear.hh.


Member Typedef Documentation

typedef Function_v2v<void> mln::Function_v2v< linear< V, T, R > >::category [inherited]

Reimplemented from mln::Function< linear< V, T, R > >.

Definition at line 126 of file function.hh.

typedef linear< V, T, R > mln::Object< linear< V, T, R > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef void mln::Function_v2v< linear< V, T, R > >::mutable_result [inherited]

Definition at line 127 of file function.hh.

template<typename V, typename T = V, typename R = T>
typedef R mln::fun::v2v::linear< V, T, R >::result

Definition at line 57 of file v2v/linear.hh.


Constructor & Destructor Documentation

template<typename V , typename T , typename R >
mln::fun::v2v::linear< V, T, R >::linear ( T  a,
T  b 
) [inline]

Definition at line 91 of file v2v/linear.hh.


Member Function Documentation

template<typename V , typename T , typename R >
R mln::fun::v2v::linear< V, T, R >::operator() ( const V &  v  )  const [inline]
template<typename V , typename T , typename R >
template<typename U >
R mln::fun::v2v::linear< V, T, R >::operator() ( const U &  u  )  const [inline]

Definition at line 109 of file v2v/linear.hh.

References mln::fun::v2v::linear< V, T, R >::operator()().


Member Data Documentation

template<typename V, typename T = V, typename R = T>
T mln::fun::v2v::linear< V, T, R >::a

Definition at line 65 of file v2v/linear.hh.

Referenced by mln::fun::v2v::linear< V, T, R >::operator()().

template<typename V, typename T = V, typename R = T>
T mln::fun::v2v::linear< V, T, R >::b

Definition at line 65 of file v2v/linear.hh.

Referenced by mln::fun::v2v::linear< V, T, R >::operator()().