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
-
Iter1 First base iterator type of the transform iterator. Iter2 Second base iterator type of the transform iterator. Op The 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_type > | pointer |
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_type & | operator= (const this_type &other) |
Copy operator. More... | |
template<typename It1 , typename It2 > | |
this_type & | operator= (const BinaryTransformIterator< It1, It2, Op > &other) |
Copy conversion operator. More... | |
this_type & | operator++ () |
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
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
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
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
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
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
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
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
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]
|
inline |
Constructor.
- Parameters
-
it1 First base iterator it2 Second base iterator op The transform operator
Definition at line 94 of file transform_iterator.h.
◆ BinaryTransformIterator() [2/3]
|
inline |
Copy constructor.
- Parameters
-
other The transform iterator to copy
Definition at line 100 of file transform_iterator.h.
◆ BinaryTransformIterator() [3/3]
|
inline |
Copy conversion constructor.
This constructor allows copying when the base iterators are implicitly convertible with each other.
- Template Parameters
-
It1 An iterator type that is implicitly convertible to base_iterator1
type.It2 An iterator type that is implicitly convertible to base_iterator2
type.
- Parameters
-
other The 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()
|
inline |
First base iterator accessor.
- Returns
- A copy of the first base iterator.
Definition at line 206 of file transform_iterator.h.
◆ base2()
|
inline |
Second base iterator accessor.
- Returns
- A copy of the second base iterator.
Definition at line 211 of file transform_iterator.h.
◆ operator!=()
|
inline |
Inequality operator.
- Template Parameters
-
It1 An iterator type that is implicitly convertible to base_iterator1
type.It2 An iterator type that is implicitly convertible to base_iterator2
type.
- Parameters
-
other The 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*()
|
inline |
Dereference operator.
- Returns
- A transformed copy of the current base iterators.
Definition at line 196 of file transform_iterator.h.
◆ operator++() [1/2]
|
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]
|
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->()
|
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]
|
inline |
Copy conversion operator.
This operator allows copying when the base iterators are implicitly convertible with each other.
- Template Parameters
-
It1 An iterator type that is implicitly convertible to base_iterator1
type.It2 An iterator type that is implicitly convertible to base_iterator2
type.
- Parameters
-
other The 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]
|
inline |
Copy operator.
- Parameters
-
other The transform iterator to copy
- Returns
- A reference to this object
Definition at line 121 of file transform_iterator.h.
◆ operator==()
|
inline |
Equality operator.
- Template Parameters
-
It1 An iterator type that is implicitly convertible to base_iterator1
type.It2 An iterator type that is implicitly convertible to base_iterator2
type.
- Parameters
-
other The 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
|
friend |
Definition at line 74 of file transform_iterator.h.
The documentation for this class was generated from the following file:
- TiledArray/transform_iterator.h