An adaptable unary function used to compose two unary functions.
More...
#include <utilities/stlutils.h>
|
| unary_compose (const Operation1 &x, const Operation2 &y) |
| Creates a new composition function. More...
|
|
Operation1::result_type | operator() (const typename Operation2::argument_type &x) const |
| Returns the result of this composition function when applied to the given argument. More...
|
|
|
Operation1 | func1 |
| The first function to use in the composition. More...
|
|
Operation2 | func2 |
| The second function to use in the composition. More...
|
|
template<class Operation1, class Operation2>
class regina::stl::unary_compose< Operation1, Operation2 >
An adaptable unary function used to compose two unary functions.
This class is for use with the Standard Template Library.
The composition of functions func1
and func2
is the function comp
for which comp(x) == func1(func2(x))
.
- Precondition
- Both template arguments are themselves adaptable unary functions.
-
Type
Operation1::argument_type
is the same as (or can be constructed from) type Operation2::result_type
.
- Python:
- Not present.
- Author
- This class was taken and modified from the Standard Template Library (
http://www.stlport.org/
).
template<class Operation1 , class Operation2 >
Creates a new composition function.
The new function comp
will satisfy comp(arg) == x(y(arg))
.
- Parameters
-
x | the first function to use in the composition. |
y | the second function to use in the composition. |
template<class Operation1 , class Operation2 >
Operation1::result_type regina::stl::unary_compose< Operation1, Operation2 >::operator() |
( |
const typename Operation2::argument_type & |
x | ) |
const |
|
inline |
Returns the result of this composition function when applied to the given argument.
- Parameters
-
x | the argument to pass to this composition function. |
- Returns
- the corresponding result of this function.
template<class Operation1 , class Operation2 >
The first function to use in the composition.
template<class Operation1 , class Operation2 >
The second function to use in the composition.
The documentation for this class was generated from the following file: