coupling_iterator Class Template Reference

#include <ql/Utilities/couplingiterator.hpp>

List of all members.


Detailed Description

template<class Iterator1, class Iterator2, class Function>
class QuantLib::coupling_iterator< Iterator1, Iterator2, Function >

Iterator mapping a function to a pair of underlying sequences.

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


Public Types

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

Public Member Functions

 coupling_iterator (Iterator1 it1, Iterator2 it2, Function f)
Dereferencing
reference operator * () const
pointer operator-> () const
Random access
value_type operator[] (difference_type n) const
Increment and decrement
coupling_iteratoroperator++ ()
coupling_iterator operator++ (int)
coupling_iteratoroperator-- ()
coupling_iterator operator-- (int)
coupling_iteratoroperator+= (difference_type n)
coupling_iteratoroperator-= (difference_type n)
coupling_iterator operator+ (difference_type n) const
coupling_iterator operator- (difference_type n) const
Difference
difference_type operator- (const coupling_iterator &rhs) const
Comparisons
bool operator== (const coupling_iterator &rhs) const
bool operator!= (const coupling_iterator &rhs) const

Public Attributes

typedef< Iterator1 >::difference_type difference_type

Related Functions

(Note that these are not member functions.)

coupling_iterator< It1, It2,
Function > 
make_coupling_iterator (It1 it1, It2 it2, Function f)
 helper function to create combining iterators


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