#include <utilmm/functional/binary_compose.hh>
Public Member Functions | |
| binary_compose_2 (BinaryFun const &bin, UnaryFun1 const &one, UnaryFun2 const &two) | |
| Constructor. | |
| BinaryFun::result_type | operator() (first_arg a, second_arg b) const |
| Call operator. | |
Related Functions | |
| (Note that these are not member functions.) | |
| template<class Bin, class Fun1, class Fun2> | |
| binary_compose_2 < Bin, Fun1, Fun2 > | compose2_2 (Bin const &f, Fun1 const &a, Fun2 const &b) |
| Composition function. | |
This class helps programmers to compose one std::binary_function with two std::unary_function
| BinaryFun | The binary functor | |
| UnaryFun1 | The first unary function | |
| UnaryFun2 | The second unary function |
BinaryFun(UnaryFun1(x), UnaryFun2(y))
result_type of UnaryFun1 must be default convertible to the first_argument_type of BinaryFun
The result_type of UnaryFun2 must be default convertible to the second_argument_type of BinaryFun
| utilmm::binary_compose_2< BinaryFun, UnaryFun1, UnaryFun2 >::binary_compose_2 | ( | BinaryFun const & | bin, | |
| UnaryFun1 const & | one, | |||
| UnaryFun2 const & | two | |||
| ) | [inline] |
Constructor.
Create a new instance having the three functors instances to compose.
| bin | The binary functor | |
| one | The first unary functor | |
| two | The second unary functor |
| BinaryFun::result_type utilmm::binary_compose_2< BinaryFun, UnaryFun1, UnaryFun2 >::operator() | ( | first_arg | a, | |
| second_arg | b | |||
| ) | const [inline] |
Call operator.
Compute the result of the composition for given arguments
| a | The first argument | |
| b | The second argument |
| binary_compose_2< Bin, Fun1, Fun2 > compose2_2 | ( | Bin const & | f, | |
| Fun1 const & | a, | |||
| Fun2 const & | b | |||
| ) | [related] |
Composition function.
This function create a new binary_compose_2 based on one binary_function and two unary functions. It only ease the declaration of binary_compose_2 instances.
| f | The binary function | |
| a | The first unary function | |
| b | The second unary function |
f(a(x), b(y))
1.5.3