combining_iterator Class Template Reference

#include <ql/Utilities/combiningiterator.hpp>

List of all members.


Detailed Description

template<class Iterator, class Function>
class QuantLib::combining_iterator< Iterator, Function >

Iterator mapping a function to a set of underlying sequences.

This iterator advances a set of underlying iterators and returns the values obtained by applying a function to the sets of values such iterators point to.

This class was implemented based on Christopher Baus and Thomas Becker, Custom Iterators for the STL, included in the proceedings of the First Workshop on C++ Template Programming, Erfurt, Germany, 2000 (http://www.oonumerics.org/tmpw00/)


Public Types

typedef Function::result_type value_type
typedef const Function::result_type * pointer
typedef const Function::result_type & reference

Public Member Functions

template<class IteratorCollectionIterator>  combining_iterator (IteratorCollectionIterator it1, IteratorCollectionIterator it2, Function f)
Dereferencing
reference operator * () const
pointer operator-> () const
Random access
value_type operator[] (difference_type n) const
Increment and decrement
combining_iteratoroperator++ ()
combining_iterator operator++ (int)
combining_iteratoroperator-- ()
combining_iterator operator-- (int)
combining_iteratoroperator+= (difference_type n)
combining_iteratoroperator-= (difference_type n)
combining_iterator operator+ (difference_type n) const
combining_iterator operator- (difference_type n) const
Difference
difference_type operator- (const combining_iterator< Iterator, Function > &rhs) const
Comparisons
bool operator== (const combining_iterator< Iterator, Function > &rhs) const
bool operator!= (const combining_iterator< Iterator, Function > &rhs) const

Public Attributes

typedef< Iterator >::difference_type difference_type

Related Functions

(Note that these are not member functions.)

combining_iterator< typename 1<
It >::value_type, Function > 
make_combining_iterator (It it1, It it2, Function f)
 helper function to create combining iterators


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen