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>
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) | |
R | operator() (const V &v) const |
template<typename U > | |
R | operator() (const U &u) const |
Public Attributes | |
T | a |
T | b |
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
.
typedef Function_v2v<void> mln::Function_v2v< linear< V, T, R > >::category [inherited] |
Reimplemented from mln::Function< linear< V, T, R > >.
typedef void mln::Function_v2v< linear< V, T, R > >::mutable_result [inherited] |
typedef R mln::fun::v2v::linear< V, T, R >::result |
mln::fun::v2v::linear< V, T, R >::linear | ( | T | a, | |
T | b | |||
) | [inline] |
R mln::fun::v2v::linear< V, T, R >::operator() | ( | const V & | v | ) | const [inline] |
References mln::fun::v2v::linear< V, T, R >::a, mln::fun::v2v::linear< V, T, R >::b, and mln::fun::T.
Referenced by mln::fun::v2v::linear< V, T, R >::operator()().
R mln::fun::v2v::linear< V, T, R >::operator() | ( | const U & | u | ) | const [inline] |
References mln::fun::v2v::linear< V, T, R >::operator()().
T mln::fun::v2v::linear< V, T, R >::a |
Referenced by mln::fun::v2v::linear< V, T, R >::operator()().
T mln::fun::v2v::linear< V, T, R >::b |
Referenced by mln::fun::v2v::linear< V, T, R >::operator()().