[][src]Trait opencv::core::SparseMatConstIteratorTrait

pub trait SparseMatConstIteratorTrait {
    fn as_raw_SparseMatConstIterator(&self) -> *mut c_void;

    fn node(&self) -> Result<SparseMat_Node> { ... }
fn seek_end(&mut self) -> Result<()> { ... } }

Read-Only Sparse Matrix Iterator.

Here is how to use the iterator to compute the sum of floating-point sparse matrix elements:

\code 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(); \endcode

Required methods

Loading content...

Provided methods

fn node(&self) -> Result<SparseMat_Node>

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

fn seek_end(&mut self) -> Result<()>

moves iterator to the element after the last element

Loading content...

Implementors

impl SparseMatConstIteratorTrait for SparseMatConstIterator[src]

impl SparseMatConstIteratorTrait for SparseMatIterator[src]

Loading content...