regina::stl::unary_compose< Operation1, Operation2 > Class Template Reference
[Utilities]

An adaptable unary function used to compose two unary functions. More...

#include <stlutils.h>

List of all members.

Public Member Functions

 unary_compose (const Operation1 &x, const Operation2 &y)
 Creates a new composition function.
Operation1::result_type operator() (const typename Operation2::argument_type &x) const
 Returns the result of this composition function when applied to the given argument.

Protected Attributes

Operation1 func1
 The first function to use in the composition.
Operation2 func2
 The second function to use in the composition.


Detailed Description

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/).

Constructor & Destructor Documentation

template<class Operation1 , class Operation2 >
regina::stl::unary_compose< Operation1, Operation2 >::unary_compose ( const Operation1 &  x,
const Operation2 &  y 
) [inline]

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.


Member Function Documentation

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.


Member Data Documentation

template<class Operation1 , class Operation2 >
Operation1 regina::stl::unary_compose< Operation1, Operation2 >::func1 [protected]

The first function to use in the composition.

template<class Operation1 , class Operation2 >
Operation2 regina::stl::unary_compose< Operation1, Operation2 >::func2 [protected]

The second function to use in the composition.


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

Copyright © 1999-2009, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).