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

Access functor used by Math::VectorIteratorTraits to read mutable vector elements via Util::IndexedElementIterator. More...

#include <VectorIterator.hpp>

Public Member Functions

 VectorElementAccessor (VectorType &e)
 Constructs the accessor referencing the (mutable) vector e. More...
 
Reference operator() (SizeType i) const
 Returns a mutable reference to the element at index i of the referenced vector. More...
 
bool operator== (const VectorElementAccessor &accessor) const
 Tells whether this accessor references the same vector as accessor. More...
 

Detailed Description

template<typename E>
class CDPL::Math::VectorElementAccessor< E >

Access functor used by Math::VectorIteratorTraits to read mutable vector elements via Util::IndexedElementIterator.

Template Parameters
EThe vector expression type.

Constructor & Destructor Documentation

◆ VectorElementAccessor()

template<typename E >
CDPL::Math::VectorElementAccessor< E >::VectorElementAccessor ( VectorType &  e)
inline

Constructs the accessor referencing the (mutable) vector e.

Parameters
eThe referenced vector.

Member Function Documentation

◆ operator()()

template<typename E >
Reference CDPL::Math::VectorElementAccessor< E >::operator() ( SizeType  i) const
inline

Returns a mutable reference to the element at index i of the referenced vector.

Parameters
iThe zero-based element index.
Returns
A mutable reference to the element.

◆ operator==()

template<typename E >
bool CDPL::Math::VectorElementAccessor< E >::operator== ( const VectorElementAccessor< E > &  accessor) const
inline

Tells whether this accessor references the same vector as accessor.

Parameters
accessorThe other accessor.
Returns
true if both accessors reference the same vector, and false otherwise.

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