OpenCV
3.4.2
Open Source Computer Vision
|
Read-Only Sparse Matrix Iterator. More...
#include "mat.hpp"
Public Member Functions | |
SparseMatConstIterator () | |
the default constructor More... | |
SparseMatConstIterator (const SparseMat *_m) | |
the full constructor setting the iterator to the first sparse matrix element More... | |
SparseMatConstIterator (const SparseMatConstIterator &it) | |
the copy constructor More... | |
const SparseMat::Node * | node () const |
returns the current node of the sparse matrix. it.node->idx is the current element index More... | |
SparseMatConstIterator & | operator++ () |
moves iterator to the next element More... | |
SparseMatConstIterator | operator++ (int) |
moves iterator to the next element More... | |
SparseMatConstIterator & | operator-- () |
moves iterator to the previous element More... | |
SparseMatConstIterator | operator-- (int) |
moves iterator to the previous element More... | |
SparseMatConstIterator & | operator= (const SparseMatConstIterator &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 SparseMat * | m |
uchar * | ptr |
Read-Only Sparse Matrix Iterator.
Here is how to use the iterator to compute the sum of floating-point sparse matrix elements:
cv::SparseMatConstIterator::SparseMatConstIterator | ( | ) |
the default constructor
cv::SparseMatConstIterator::SparseMatConstIterator | ( | const SparseMat * | _m | ) |
the full constructor setting the iterator to the first sparse matrix element
cv::SparseMatConstIterator::SparseMatConstIterator | ( | const SparseMatConstIterator & | it | ) |
the copy constructor
const SparseMat::Node* cv::SparseMatConstIterator::node | ( | ) | const |
returns the current node of the sparse matrix. it.node->idx is the current element index
SparseMatConstIterator& cv::SparseMatConstIterator::operator++ | ( | ) |
moves iterator to the next element
SparseMatConstIterator cv::SparseMatConstIterator::operator++ | ( | int | ) |
moves iterator to the next element
SparseMatConstIterator& cv::SparseMatConstIterator::operator-- | ( | ) |
moves iterator to the previous element
SparseMatConstIterator cv::SparseMatConstIterator::operator-- | ( | int | ) |
moves iterator to the previous element
SparseMatConstIterator& cv::SparseMatConstIterator::operator= | ( | const SparseMatConstIterator & | it | ) |
the assignment operator
void cv::SparseMatConstIterator::seekEnd | ( | ) |
moves iterator to the element after the last element
const _Tp& cv::SparseMatConstIterator::value | ( | ) | const |
template method returning the current matrix element
size_t cv::SparseMatConstIterator::hashidx |
const SparseMat* cv::SparseMatConstIterator::m |
uchar* cv::SparseMatConstIterator::ptr |