OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
cv::SparseMatIterator_< _Tp > Class Template Reference

Template Read-Write Sparse Matrix Iterator Class. More...

#include <opencv2/core/mat.hpp>

Inheritance diagram for cv::SparseMatIterator_< _Tp >:
Collaboration diagram for cv::SparseMatIterator_< _Tp >:

Public Types

typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 SparseMatIterator_ ()
 the default constructor More...
 
 SparseMatIterator_ (SparseMat_< _Tp > *_m)
 the full constructor setting the iterator to the first sparse matrix element More...
 
 SparseMatIterator_ (SparseMat *_m)
 
 SparseMatIterator_ (const SparseMatIterator_ &it)
 the copy constructor More...
 
const SparseMat::Nodenode () const
 returns the current node of the sparse matrix. it.node->idx is the current element index More...
 
_Tp & operator* () const
 returns the reference to the current element More...
 
SparseMatIterator_operator++ ()
 moves the iterator to the next element More...
 
SparseMatIterator_ operator++ (int)
 moves the iterator to the next element More...
 
SparseMatConstIteratoroperator-- ()
 moves iterator to the previous element More...
 
SparseMatConstIterator operator-- (int)
 moves iterator to the previous element More...
 
SparseMatIterator_operator= (const SparseMatIterator_ &it)
 the assignment operator More...
 
void seekEnd ()
 moves iterator to the element after the last element More...
 
template<typename _Tp >
const _Tp & value () const
 template method returning the current matrix element More...
 

Public Attributes

size_t hashidx
 
const SparseMatm
 
ucharptr
 

Detailed Description

template<typename _Tp>
class cv::SparseMatIterator_< _Tp >

Template Read-Write Sparse Matrix Iterator Class.

This is the derived from cv::SparseMatConstIterator_ class that introduces more convenient operator *() for accessing the current element.

Member Typedef Documentation

◆ iterator_category

template<typename _Tp >
typedef std::forward_iterator_tag cv::SparseMatIterator_< _Tp >::iterator_category

Constructor & Destructor Documentation

◆ SparseMatIterator_() [1/4]

template<typename _Tp >
cv::SparseMatIterator_< _Tp >::SparseMatIterator_ ( )

the default constructor

◆ SparseMatIterator_() [2/4]

template<typename _Tp >
cv::SparseMatIterator_< _Tp >::SparseMatIterator_ ( SparseMat_< _Tp > *  _m)

the full constructor setting the iterator to the first sparse matrix element

◆ SparseMatIterator_() [3/4]

template<typename _Tp >
cv::SparseMatIterator_< _Tp >::SparseMatIterator_ ( SparseMat _m)

◆ SparseMatIterator_() [4/4]

template<typename _Tp >
cv::SparseMatIterator_< _Tp >::SparseMatIterator_ ( const SparseMatIterator_< _Tp > &  it)

the copy constructor

Member Function Documentation

◆ node()

const SparseMat::Node* cv::SparseMatConstIterator::node ( ) const
inherited

returns the current node of the sparse matrix. it.node->idx is the current element index

◆ operator*()

template<typename _Tp >
_Tp& cv::SparseMatIterator_< _Tp >::operator* ( ) const

returns the reference to the current element

◆ operator++() [1/2]

template<typename _Tp >
SparseMatIterator_& cv::SparseMatIterator_< _Tp >::operator++ ( )

moves the iterator to the next element

◆ operator++() [2/2]

template<typename _Tp >
SparseMatIterator_ cv::SparseMatIterator_< _Tp >::operator++ ( int  )

moves the iterator to the next element

◆ operator--() [1/2]

SparseMatConstIterator& cv::SparseMatConstIterator::operator-- ( )
inherited

moves iterator to the previous element

◆ operator--() [2/2]

SparseMatConstIterator cv::SparseMatConstIterator::operator-- ( int  )
inherited

moves iterator to the previous element

◆ operator=()

template<typename _Tp >
SparseMatIterator_& cv::SparseMatIterator_< _Tp >::operator= ( const SparseMatIterator_< _Tp > &  it)

the assignment operator

◆ seekEnd()

void cv::SparseMatConstIterator::seekEnd ( )
inherited

moves iterator to the element after the last element

◆ value()

template<typename _Tp >
const _Tp& cv::SparseMatConstIterator::value ( ) const
inherited

template method returning the current matrix element

Member Data Documentation

◆ hashidx

size_t cv::SparseMatConstIterator::hashidx
inherited

◆ m

const SparseMat* cv::SparseMatConstIterator::m
inherited

◆ ptr

uchar* cv::SparseMatConstIterator::ptr
inherited

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