template class cv::SparseMatIterator_

Overview

Template Read-Write Sparse Matrix Iterator Class. Moreā€¦

#include <mat.hpp>

template <typename _Tp>
class SparseMatIterator_: public cv::SparseMatConstIterator_
{
public:
    // typedefs

    typedef std::forward_iterator_tag iterator_category;

    // construction

    SparseMatIterator_();
    SparseMatIterator_(SparseMat_<_Tp>* _m);
    SparseMatIterator_(SparseMat* _m);
    SparseMatIterator_(const SparseMatIterator_& it);

    // methods

    _Tp&
    operator*() const;

    SparseMatIterator_&
    operator++();

    SparseMatIterator_
    operator++(int);

    SparseMatIterator_&
    operator=(const SparseMatIterator_& it);
};

Inherited Members

public:
    // typedefs

    typedef std::forward_iterator_tag iterator_category;

    // fields

    size_t hashidx;
    const SparseMat* m;
    uchar* ptr;

    // methods

    const SparseMat::Node*
    node() const;

    SparseMatConstIterator&
    operator++();

    SparseMatConstIterator
    operator++(int);

    SparseMatConstIterator&
    operator--();

    SparseMatConstIterator
    operator--(int);

    SparseMatConstIterator&
    operator=(const SparseMatConstIterator& it);

    void
    seekEnd();

    template <typename _Tp>
    const _Tp&
    value() const;

    const _Tp&
    operator*() const;

    SparseMatConstIterator_&
    operator++();

    SparseMatConstIterator_
    operator++(int);

    SparseMatConstIterator_&
    operator=(const SparseMatConstIterator_& it);

Detailed Documentation

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.

Construction

SparseMatIterator_()

the default constructor

SparseMatIterator_(SparseMat_<_Tp>* _m)

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

SparseMatIterator_(const SparseMatIterator_& it)

the copy constructor

Methods

_Tp&
operator*() const

returns the reference to the current element

SparseMatIterator_&
operator++()

moves the iterator to the next element

SparseMatIterator_
operator++(int)

moves the iterator to the next element

SparseMatIterator_&
operator=(const SparseMatIterator_& it)

the assignment operator