template class cv::SparseMatConstIterator_

Overview

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

#include <mat.hpp>

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

    typedef std::forward_iterator_tag iterator_category;

    // construction

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

    // methods

    const _Tp&
    operator*() const;

    SparseMatConstIterator_&
    operator++();

    SparseMatConstIterator_
    operator++(int);

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

// direct descendants

template <typename _Tp>
class SparseMatIterator_;

Inherited Members

public:
    // 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;

Detailed Documentation

Template Read-Only Sparse Matrix Iterator Class.

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

Construction

SparseMatConstIterator_()

the default constructor

SparseMatConstIterator_(const SparseMat_<_Tp>* _m)

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

SparseMatConstIterator_(const SparseMatConstIterator_& it)

the copy constructor

Methods

const _Tp&
operator*() const

the element access operator

SparseMatConstIterator_&
operator++()

moves iterator to the next element

SparseMatConstIterator_
operator++(int)

moves iterator to the next element

SparseMatConstIterator_&
operator=(const SparseMatConstIterator_& it)

the assignment operator