Public Types | Public Member Functions | Private Attributes | List of all members
blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator Class Reference

Iterator over the elements of the sparse matrix/dense matrix Schur product expression. More...

#include <SMatDMatSchurExpr.h>

Public Types

using Element = ValueIndexPair< ElementType >
 Element type of the sparse matrix expression.
 
using LeftIterator = ConstIterator_< RemoveReference_< LeftOperand > >
 Iterator type of the sparse matrix expression.
 
using IteratorCategory = std::forward_iterator_tag
 The iterator category.
 
using ValueType = Element
 Type of the underlying pointers.
 
using PointerType = ValueType *
 Pointer return type.
 
using ReferenceType = ValueType &
 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 pointers.
 
using pointer = PointerType
 Pointer return type.
 
using reference = ReferenceType
 Reference return type.
 
using difference_type = DifferenceType
 Difference between two iterators.
 

Public Member Functions

 ConstIterator (LeftIterator left, RightOperand right, size_t row)
 Constructor for the ConstIterator class. More...
 
ConstIteratoroperator++ ()
 Pre-increment operator. More...
 
const Element operator* () const
 Direct access to the sparse matrix element at the current iterator position. More...
 
const ConstIteratoroperator-> () const
 Direct access to the sparse matrix element at the current iterator position. More...
 
ReturnType value () const
 Access to the current value of the sparse element. More...
 
size_t index () const
 Access to the current index of the sparse element. 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...
 
DifferenceType operator- (const ConstIterator &rhs) const
 Calculating the number of elements between two expression iterators. More...
 

Private Attributes

LeftIterator left_
 Iterator over the elements of the left-hand side sparse matrix expression.
 
RightOperand right_
 Right-hand side dense matrix expression.
 
size_t row_
 The row index of the iterator.
 

Detailed Description

template<typename MT1, typename MT2>
class blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator

Iterator over the elements of the sparse matrix/dense matrix Schur product expression.

Constructor & Destructor Documentation

◆ ConstIterator()

template<typename MT1 , typename MT2 >
blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::ConstIterator ( LeftIterator  left,
RightOperand  right,
size_t  row 
)
inline

Constructor for the ConstIterator class.

Parameters
leftIterator to the current position in the left-hand side sparse matrix expression.
rightHandle to the right-hand side dense matrix expression.
rowThe row index of the given iterator.

Member Function Documentation

◆ index()

template<typename MT1 , typename MT2 >
size_t blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::index ( ) const
inline

Access to the current index of the sparse element.

Returns
The current index of the sparse element.

◆ operator!=()

template<typename MT1 , typename MT2 >
bool blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator!= ( const ConstIterator rhs) const
inline

Inequality comparison between two ConstIterator objects.

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

◆ operator*()

template<typename MT1 , typename MT2 >
const Element blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator* ( ) const
inline

Direct access to the sparse matrix element at the current iterator position.

Returns
The element at the current iterator position.

◆ operator++()

template<typename MT1 , typename MT2 >
ConstIterator& blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator++ ( )
inline

Pre-increment operator.

Returns
Reference to the incremented expression iterator.

◆ operator-()

template<typename MT1 , typename MT2 >
DifferenceType blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator- ( const ConstIterator rhs) const
inline

Calculating the number of elements between two expression iterators.

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

◆ operator->()

template<typename MT1 , typename MT2 >
const ConstIterator* blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator-> ( ) const
inline

Direct access to the sparse matrix element at the current iterator position.

Returns
Reference to the sparse matrix element at the current iterator position.

◆ operator==()

template<typename MT1 , typename MT2 >
bool blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::operator== ( const ConstIterator rhs) const
inline

Equality comparison between two ConstIterator objects.

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

◆ value()

template<typename MT1 , typename MT2 >
ReturnType blaze::SMatDMatSchurExpr< MT1, MT2 >::ConstIterator::value ( ) const
inline

Access to the current value of the sparse element.

Returns
The current value of the sparse element.

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