Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
vigra_ext::NestFunctor< F1, F2 > Struct Template Reference

functor to combine two functors: result = f1( f2(v) ) More...

#include <utils.h>

Public Types

typedef F1::result_type result_type
 the functor's second argument type More...
 

Public Member Functions

 NestFunctor (const F1 &fu1, const F2 &fu2)
 
template<class T1 >
result_type operator() (T1 const &v) const
 
template<class T1 , class T2 >
result_type operator() (T1 const &v1, T2 const &v2) const
 if F2 takes 2 arguments More...
 
template<class T1 , class T2 , class T3 >
result_type operator() (T1 const &v1, T2 const &v2, T3 const &v3) const
 if F2 takes 3 arguments More...
 

Public Attributes

F1 f1
 
F2 f2
 

Detailed Description

template<class F1, class F2>
struct vigra_ext::NestFunctor< F1, F2 >

functor to combine two functors: result = f1( f2(v) )

The functors are copied, so there is no way to get their internal state after they have been applied.

This is quite useful for multithreaded processing.

Definition at line 431 of file utils.h.

Member Typedef Documentation

template<class F1, class F2>
typedef F1::result_type vigra_ext::NestFunctor< F1, F2 >::result_type

the functor's second argument type

Definition at line 441 of file utils.h.

Constructor & Destructor Documentation

template<class F1, class F2>
vigra_ext::NestFunctor< F1, F2 >::NestFunctor ( const F1 &  fu1,
const F2 &  fu2 
)
inline

Definition at line 435 of file utils.h.

Member Function Documentation

template<class F1, class F2>
template<class T1 >
result_type vigra_ext::NestFunctor< F1, F2 >::operator() ( T1 const &  v) const
inline
template<class F1, class F2>
template<class T1 , class T2 >
result_type vigra_ext::NestFunctor< F1, F2 >::operator() ( T1 const &  v1,
T2 const &  v2 
) const
inline

if F2 takes 2 arguments

Definition at line 451 of file utils.h.

References vigra_ext::NestFunctor< F1, F2 >::f1, and vigra_ext::NestFunctor< F1, F2 >::f2.

template<class F1, class F2>
template<class T1 , class T2 , class T3 >
result_type vigra_ext::NestFunctor< F1, F2 >::operator() ( T1 const &  v1,
T2 const &  v2,
T3 const &  v3 
) const
inline

if F2 takes 3 arguments

Definition at line 458 of file utils.h.

References vigra_ext::NestFunctor< F1, F2 >::f1, and vigra_ext::NestFunctor< F1, F2 >::f2.

Member Data Documentation

template<class F1, class F2>
F1 vigra_ext::NestFunctor< F1, F2 >::f1

Definition at line 433 of file utils.h.

Referenced by vigra_ext::NestFunctor< F1, F2 >::operator()().

template<class F1, class F2>
F2 vigra_ext::NestFunctor< F1, F2 >::f2

Definition at line 434 of file utils.h.

Referenced by vigra_ext::NestFunctor< F1, F2 >::operator()().


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