TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op > Class Template Reference

Documentation

template<typename Iter1, typename Iter2, typename Op>
class TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >

Binary transform iterator.

This iterator holds a pair of iterators that are transformed when dereferenced with a binary transform object that is provided by the user. The first iterator is the left-hand argument and the second is the right-hand argument for the transform operator. The iterator dereferences to the result type of the transform operations.

Template Parameters
Iter1First base iterator type of the transform iterator.
Iter2Second base iterator type of the transform iterator.
OpThe transform operator type.

Definition at line 70 of file transform_iterator.h.

Public Types

typedef std::ptrdiff_t difference_type
 Difference type. More...
 
typedef madness::detail::result_of< Op >::type value_type
 Iterator dereference value type. More...
 
typedef PointerProxy< value_typepointer
 Pointer type to iterator value. More...
 
typedef value_type reference
 Reference type to iterator value. More...
 
typedef std::input_iterator_tag iterator_category
 Iterator category type. More...
 
typedef BinaryTransformIterator< Iter1, Iter2, Op > this_type
 This object type. More...
 
typedef Iter1 base_iterator1
 First base iterator type. More...
 
typedef Iter2 base_iterator2
 Second base iterator type. More...
 

Public Member Functions

 BinaryTransformIterator (Iter1 it1, Iter2 it2, Op op=Op())
 Constructor. More...
 
 BinaryTransformIterator (const this_type &other)
 Copy constructor. More...
 
template<typename It1 , typename It2 >
 BinaryTransformIterator (const BinaryTransformIterator< It1, It2, Op > &other)
 Copy conversion constructor. More...
 
this_typeoperator= (const this_type &other)
 Copy operator. More...
 
template<typename It1 , typename It2 >
this_typeoperator= (const BinaryTransformIterator< It1, It2, Op > &other)
 Copy conversion operator. More...
 
this_typeoperator++ ()
 Prefix increment operator. More...
 
this_type operator++ (int)
 Post-fix increment operator. More...
 
template<typename It1 , typename It2 >
bool operator== (const BinaryTransformIterator< It1, It2, Op > &other) const
 Equality operator. More...
 
template<typename It1 , typename It2 >
bool operator!= (const BinaryTransformIterator< It1, It2, Op > &other) const
 Inequality operator. More...
 
reference operator* ()
 Dereference operator. More...
 
pointer operator-> ()
 Arrow dereference operator. More...
 
base_iterator1 base1 () const
 First base iterator accessor. More...
 
base_iterator2 base2 () const
 Second base iterator accessor. More...
 

Friends

template<typename , typename , typename >
class BinaryTransformIterator
 

Member Typedef Documentation

◆ base_iterator1

template<typename Iter1 , typename Iter2 , typename Op >
typedef Iter1 TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::base_iterator1

First base iterator type.

Definition at line 86 of file transform_iterator.h.

◆ base_iterator2

template<typename Iter1 , typename Iter2 , typename Op >
typedef Iter2 TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::base_iterator2

Second base iterator type.

Definition at line 87 of file transform_iterator.h.

◆ difference_type

template<typename Iter1 , typename Iter2 , typename Op >
typedef std::ptrdiff_t TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::difference_type

Difference type.

Definition at line 77 of file transform_iterator.h.

◆ iterator_category

template<typename Iter1 , typename Iter2 , typename Op >
typedef std::input_iterator_tag TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::iterator_category

Iterator category type.

Definition at line 83 of file transform_iterator.h.

◆ pointer

template<typename Iter1 , typename Iter2 , typename Op >
typedef PointerProxy<value_type> TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::pointer

Pointer type to iterator value.

Definition at line 80 of file transform_iterator.h.

◆ reference

template<typename Iter1 , typename Iter2 , typename Op >
typedef value_type TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::reference

Reference type to iterator value.

Definition at line 81 of file transform_iterator.h.

◆ this_type

template<typename Iter1 , typename Iter2 , typename Op >
typedef BinaryTransformIterator<Iter1, Iter2, Op> TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::this_type

This object type.

Definition at line 85 of file transform_iterator.h.

◆ value_type

template<typename Iter1 , typename Iter2 , typename Op >
typedef madness::detail::result_of<Op>::type TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::value_type

Iterator dereference value type.

Definition at line 79 of file transform_iterator.h.

Constructor & Destructor Documentation

◆ BinaryTransformIterator() [1/3]

template<typename Iter1 , typename Iter2 , typename Op >
TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::BinaryTransformIterator ( Iter1  it1,
Iter2  it2,
Op  op = Op() 
)
inline

Constructor.

Parameters
it1First base iterator
it2Second base iterator
opThe transform operator

Definition at line 94 of file transform_iterator.h.

◆ BinaryTransformIterator() [2/3]

template<typename Iter1 , typename Iter2 , typename Op >
TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::BinaryTransformIterator ( const this_type other)
inline

Copy constructor.

Parameters
otherThe transform iterator to copy

Definition at line 100 of file transform_iterator.h.

◆ BinaryTransformIterator() [3/3]

template<typename Iter1 , typename Iter2 , typename Op >
template<typename It1 , typename It2 >
TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::BinaryTransformIterator ( const BinaryTransformIterator< It1, It2, Op > &  other)
inline

Copy conversion constructor.

This constructor allows copying when the base iterators are implicitly convertible with each other.

Template Parameters
It1An iterator type that is implicitly convertible to base_iterator1 type.
It2An iterator type that is implicitly convertible to base_iterator2 type.
Parameters
otherThe transform iterator to copy
Note
The operation type must be the same for both transform iterators.

Definition at line 114 of file transform_iterator.h.

Member Function Documentation

◆ base1()

template<typename Iter1 , typename Iter2 , typename Op >
base_iterator1 TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::base1 ( ) const
inline

First base iterator accessor.

Returns
A copy of the first base iterator.

Definition at line 206 of file transform_iterator.h.

◆ base2()

template<typename Iter1 , typename Iter2 , typename Op >
base_iterator2 TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::base2 ( ) const
inline

Second base iterator accessor.

Returns
A copy of the second base iterator.

Definition at line 211 of file transform_iterator.h.

◆ operator!=()

template<typename Iter1 , typename Iter2 , typename Op >
template<typename It1 , typename It2 >
bool TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator!= ( const BinaryTransformIterator< It1, It2, Op > &  other) const
inline

Inequality operator.

Template Parameters
It1An iterator type that is implicitly convertible to base_iterator1 type.
It2An iterator type that is implicitly convertible to base_iterator2 type.
Parameters
otherThe iterator to compare to this iterator.
Returns
True when both base iterators are not equal to that of other, otherwise false.

Definition at line 189 of file transform_iterator.h.

◆ operator*()

template<typename Iter1 , typename Iter2 , typename Op >
reference TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator* ( )
inline

Dereference operator.

Returns
A transformed copy of the current base iterators.

Definition at line 196 of file transform_iterator.h.

◆ operator++() [1/2]

template<typename Iter1 , typename Iter2 , typename Op >
this_type& TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object after it has been incremented.

Definition at line 151 of file transform_iterator.h.

◆ operator++() [2/2]

template<typename Iter1 , typename Iter2 , typename Op >
this_type TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator++ ( int  )
inline

Post-fix increment operator.

Returns
A copy of this object before it is incremented.

Definition at line 159 of file transform_iterator.h.

◆ operator->()

template<typename Iter1 , typename Iter2 , typename Op >
pointer TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator-> ( )
inline

Arrow dereference operator.

Returns
A pointer to a transformed copy of the current base iterators.

Definition at line 201 of file transform_iterator.h.

◆ operator=() [1/2]

template<typename Iter1 , typename Iter2 , typename Op >
template<typename It1 , typename It2 >
this_type& TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator= ( const BinaryTransformIterator< It1, It2, Op > &  other)
inline

Copy conversion operator.

This operator allows copying when the base iterators are implicitly convertible with each other.

Template Parameters
It1An iterator type that is implicitly convertible to base_iterator1 type.
It2An iterator type that is implicitly convertible to base_iterator2 type.
Parameters
otherThe transform iterator to copy
Note
The operation type must be the same for both transform iterators.

Definition at line 140 of file transform_iterator.h.

◆ operator=() [2/2]

template<typename Iter1 , typename Iter2 , typename Op >
this_type& TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator= ( const this_type other)
inline

Copy operator.

Parameters
otherThe transform iterator to copy
Returns
A reference to this object

Definition at line 121 of file transform_iterator.h.

◆ operator==()

template<typename Iter1 , typename Iter2 , typename Op >
template<typename It1 , typename It2 >
bool TiledArray::detail::BinaryTransformIterator< Iter1, Iter2, Op >::operator== ( const BinaryTransformIterator< It1, It2, Op > &  other) const
inline

Equality operator.

Template Parameters
It1An iterator type that is implicitly convertible to base_iterator1 type.
It2An iterator type that is implicitly convertible to base_iterator2 type.
Parameters
otherThe iterator to compare to this iterator.
Returns
True when both base iterators are equal to that of other, otherwise false.

Definition at line 175 of file transform_iterator.h.

Friends And Related Function Documentation

◆ BinaryTransformIterator

template<typename Iter1 , typename Iter2 , typename Op >
template<typename , typename , typename >
friend class BinaryTransformIterator
friend

Definition at line 74 of file transform_iterator.h.


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