Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Static Public Member Functions | List of all members
CDPL::Math::VectorIteratorTraits< E > Struct Template Reference

Traits selecting the element accessor and Util::IndexedElementIterator specialization for mutable iteration over E. More...

#include <VectorIterator.hpp>

Public Types

typedef E VectorType
 The (mutable) vector expression type being iterated. More...
 
typedef E::SizeType SizeType
 The size type used by the iterated vector. More...
 
typedef E::ValueType ValueType
 The element value type of the iterated vector. More...
 
typedef VectorElementAccessor< E > AccessorType
 The element-access functor type used to materialize iterator references. More...
 
typedef Util::IndexedElementIterator< ValueType, AccessorType, SizeTypeIteratorType
 The constructed iterator type (a Util::IndexedElementIterator specialization). More...
 

Static Public Member Functions

static IteratorType makeIterator (VectorType &e, SizeType idx)
 Creates an iterator pointing to the element at index idx of e. More...
 

Detailed Description

template<typename E>
struct CDPL::Math::VectorIteratorTraits< E >

Traits selecting the element accessor and Util::IndexedElementIterator specialization for mutable iteration over E.

Template Parameters
EThe vector expression type.

Member Typedef Documentation

◆ VectorType

template<typename E >
typedef E CDPL::Math::VectorIteratorTraits< E >::VectorType

The (mutable) vector expression type being iterated.

◆ SizeType

template<typename E >
typedef E::SizeType CDPL::Math::VectorIteratorTraits< E >::SizeType

The size type used by the iterated vector.

◆ ValueType

template<typename E >
typedef E::ValueType CDPL::Math::VectorIteratorTraits< E >::ValueType

The element value type of the iterated vector.

◆ AccessorType

The element-access functor type used to materialize iterator references.

◆ IteratorType

The constructed iterator type (a Util::IndexedElementIterator specialization).

Member Function Documentation

◆ makeIterator()

template<typename E >
static IteratorType CDPL::Math::VectorIteratorTraits< E >::makeIterator ( VectorType e,
SizeType  idx 
)
inlinestatic

Creates an iterator pointing to the element at index idx of e.

Parameters
eThe vector expression.
idxThe zero-based index of the element to point to.
Returns
The constructed iterator.

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