Blaze  3.6
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
blaze::SMatVarExpr< MT, rowwise >::ConstIterator Class Reference

Iterator over the elements of the dense vector. More...

#include <SMatVarExpr.h>

Public Types

using IteratorCategory = std::random_access_iterator_tag
 The iterator category.
 
using ValueType = ElementType
 Type of the underlying elements.
 
using PointerType = ElementType *
 Pointer return type.
 
using ReferenceType = ElementType &
 Reference return type.
 
using DifferenceType = ptrdiff_t
 Difference between two iterators.
 
using iterator_category = IteratorCategory
 The iterator category.
 
using value_type = ValueType
 Type of the underlying elements.
 
using pointer = PointerType
 Pointer return type.
 
using reference = ReferenceType
 Reference return type.
 
using difference_type = DifferenceType
 Difference between two iterators.
 

Public Member Functions

 ConstIterator (Operand sm, size_t index)
 Constructor for the ConstIterator class. More...
 
ConstIteratoroperator+= (size_t inc)
 Addition assignment operator. More...
 
ConstIteratoroperator-= (size_t dec)
 Subtraction assignment operator. More...
 
ConstIteratoroperator++ ()
 Pre-increment operator. More...
 
const ConstIterator operator++ (int)
 Post-increment operator. More...
 
ConstIteratoroperator-- ()
 Pre-decrement operator. More...
 
const ConstIterator operator-- (int)
 Post-decrement operator. More...
 
ReturnType operator * () const
 Direct access to the element at the current iterator position. More...
 
bool operator== (const ConstIterator &rhs) const
 Equality comparison between two ConstIterator objects. More...
 
bool operator!= (const ConstIterator &rhs) const
 Inequality comparison between two ConstIterator objects. More...
 
bool operator< (const ConstIterator &rhs) const
 Less-than comparison between two ConstIterator objects. More...
 
bool operator> (const ConstIterator &rhs) const
 Greater-than comparison between two ConstIterator objects. More...
 
bool operator<= (const ConstIterator &rhs) const
 Less-than comparison between two ConstIterator objects. More...
 
bool operator>= (const ConstIterator &rhs) const
 Greater-than comparison between two ConstIterator objects. More...
 
DifferenceType operator- (const ConstIterator &rhs) const
 Calculating the number of elements between two iterators. More...
 

Private Attributes

Operand sm_
 Sparse matrix of the variance expression.
 
size_t index_
 Index to the current matrix row.
 

Friends

const ConstIterator operator+ (const ConstIterator &it, size_t inc)
 Addition between a ConstIterator and an integral value. More...
 
const ConstIterator operator+ (size_t inc, const ConstIterator &it)
 Addition between an integral value and a ConstIterator. More...
 
const ConstIterator operator- (const ConstIterator &it, size_t dec)
 Subtraction between a ConstIterator and an integral value. More...
 

Detailed Description

template<typename MT>
class blaze::SMatVarExpr< MT, rowwise >::ConstIterator

Iterator over the elements of the dense vector.

Constructor & Destructor Documentation

◆ ConstIterator()

template<typename MT >
blaze::SMatVarExpr< MT, rowwise >::ConstIterator::ConstIterator ( Operand  sm,
size_t  index 
)
inlineexplicit

Constructor for the ConstIterator class.

Parameters
smThe sparse matrix operand of the variance expression.
indexIndex to the initial matrix row.

Member Function Documentation

◆ operator *()

template<typename MT >
ReturnType blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator * ( ) const
inline

Direct access to the element at the current iterator position.

Returns
The resulting value.

◆ operator!=()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator!= ( const ConstIterator rhs) const
inline

Inequality comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the iterators don't refer to the same element, false if they do.

◆ operator++() [1/2]

template<typename MT >
ConstIterator& blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator++ ( )
inline

Pre-increment operator.

Returns
Reference to the incremented iterator.

◆ operator++() [2/2]

template<typename MT >
const ConstIterator blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator++ ( int  )
inline

Post-increment operator.

Returns
The previous position of the iterator.

◆ operator+=()

template<typename MT >
ConstIterator& blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator+= ( size_t  inc)
inline

Addition assignment operator.

Parameters
incThe increment of the iterator.
Returns
The incremented iterator.

◆ operator-()

template<typename MT >
DifferenceType blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator- ( const ConstIterator rhs) const
inline

Calculating the number of elements between two iterators.

Parameters
rhsThe right-hand side iterator.
Returns
The number of elements between the two iterators.

◆ operator--() [1/2]

template<typename MT >
ConstIterator& blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator-- ( )
inline

Pre-decrement operator.

Returns
Reference to the decremented iterator.

◆ operator--() [2/2]

template<typename MT >
const ConstIterator blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator-- ( int  )
inline

Post-decrement operator.

Returns
The previous position of the iterator.

◆ operator-=()

template<typename MT >
ConstIterator& blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator-= ( size_t  dec)
inline

Subtraction assignment operator.

Parameters
decThe decrement of the iterator.
Returns
The decremented iterator.

◆ operator<()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator< ( const ConstIterator rhs) const
inline

Less-than comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the left-hand side iterator is smaller, false if not.

◆ operator<=()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator<= ( const ConstIterator rhs) const
inline

Less-than comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the left-hand side iterator is smaller or equal, false if not.

◆ operator==()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator== ( const ConstIterator rhs) const
inline

Equality comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the iterators refer to the same element, false if not.

◆ operator>()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator> ( const ConstIterator rhs) const
inline

Greater-than comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the left-hand side iterator is greater, false if not.

◆ operator>=()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::ConstIterator::operator>= ( const ConstIterator rhs) const
inline

Greater-than comparison between two ConstIterator objects.

Parameters
rhsThe right-hand side iterator.
Returns
true if the left-hand side iterator is greater or equal, false if not.

Friends And Related Function Documentation

◆ operator+ [1/2]

template<typename MT >
const ConstIterator operator+ ( const ConstIterator it,
size_t  inc 
)
friend

Addition between a ConstIterator and an integral value.

Parameters
itThe iterator to be incremented.
incThe number of elements the iterator is incremented.
Returns
The incremented iterator.

◆ operator+ [2/2]

template<typename MT >
const ConstIterator operator+ ( size_t  inc,
const ConstIterator it 
)
friend

Addition between an integral value and a ConstIterator.

Parameters
incThe number of elements the iterator is incremented.
itThe iterator to be incremented.
Returns
The incremented iterator.

◆ operator-

template<typename MT >
const ConstIterator operator- ( const ConstIterator it,
size_t  dec 
)
friend

Subtraction between a ConstIterator and an integral value.

Parameters
itThe iterator to be decremented.
decThe number of elements the iterator is decremented.
Returns
The decremented iterator.

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