Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of gr-peach-opencv-project-sd-card by
SparseMatConstIterator Class Reference
[Basic structures]
Read-Only Sparse Matrix Iterator. More...
#include <mat.hpp>
Inherited by SparseMatConstIterator_< _Tp >, and SparseMatIterator.
Public Member Functions | |
SparseMatConstIterator () | |
the default constructor | |
SparseMatConstIterator (const SparseMat *_m) | |
the full constructor setting the iterator to the first sparse matrix element | |
SparseMatConstIterator (const SparseMatConstIterator &it) | |
the copy constructor | |
SparseMatConstIterator & | operator= (const SparseMatConstIterator &it) |
the assignment operator | |
template<typename _Tp > | |
const _Tp & | value () const |
template method returning the current matrix element | |
const SparseMat::Node * | node () const |
returns the current node of the sparse matrix. it.node->idx is the current element index | |
SparseMatConstIterator & | operator-- () |
moves iterator to the previous element | |
SparseMatConstIterator | operator-- (int) |
moves iterator to the previous element | |
SparseMatConstIterator & | operator++ () |
moves iterator to the next element | |
SparseMatConstIterator | operator++ (int) |
moves iterator to the next element | |
void | seekEnd () |
moves iterator to the element after the last element |
Detailed Description
Read-Only Sparse Matrix Iterator.
Here is how to use the iterator to compute the sum of floating-point sparse matrix elements:
SparseMatConstIterator it = m.begin(), it_end = m.end(); double s = 0; CV_Assert( m.type() == CV_32F ); for( ; it != it_end; ++it ) s += it.value<float>();
Definition at line 2959 of file mat.hpp.
Constructor & Destructor Documentation
the default constructor
SparseMatConstIterator | ( | const SparseMat * | _m ) |
the full constructor setting the iterator to the first sparse matrix element
Definition at line 5285 of file matrix.cpp.
SparseMatConstIterator | ( | const SparseMatConstIterator & | it ) |
the copy constructor
Member Function Documentation
const SparseMat::Node* node | ( | ) | const |
returns the current node of the sparse matrix. it.node->idx is the current element index
Reimplemented in SparseMatIterator.
SparseMatConstIterator & operator++ | ( | ) |
moves iterator to the next element
Reimplemented in SparseMatIterator, SparseMatConstIterator_< _Tp >, and SparseMatIterator_< _Tp >.
Definition at line 5305 of file matrix.cpp.
SparseMatConstIterator operator++ | ( | int | ) |
moves iterator to the next element
Reimplemented in SparseMatIterator, SparseMatConstIterator_< _Tp >, and SparseMatIterator_< _Tp >.
SparseMatConstIterator& operator-- | ( | ) |
moves iterator to the previous element
SparseMatConstIterator operator-- | ( | int | ) |
moves iterator to the previous element
SparseMatConstIterator& operator= | ( | const SparseMatConstIterator & | it ) |
the assignment operator
void seekEnd | ( | ) |
moves iterator to the element after the last element
const _Tp& value | ( | ) | const |
template method returning the current matrix element
Reimplemented in SparseMatIterator.
Generated on Tue Jul 12 2022 14:48:00 by
