Struct opencv::core::SparseMatConstIterator
source · pub struct SparseMatConstIterator { /* private fields */ }Expand description
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
Implementations§
source§impl SparseMatConstIterator
impl SparseMatConstIterator
sourcepub fn default() -> Result<SparseMatConstIterator>
pub fn default() -> Result<SparseMatConstIterator>
the default constructor
sourcepub fn new(_m: &SparseMat) -> Result<SparseMatConstIterator>
pub fn new(_m: &SparseMat) -> Result<SparseMatConstIterator>
the full constructor setting the iterator to the first sparse matrix element
sourcepub fn copy(it: &SparseMatConstIterator) -> Result<SparseMatConstIterator>
pub fn copy(it: &SparseMatConstIterator) -> Result<SparseMatConstIterator>
the copy constructor
Trait Implementations§
source§impl Boxed for SparseMatConstIterator
impl Boxed for SparseMatConstIterator
source§impl Drop for SparseMatConstIterator
impl Drop for SparseMatConstIterator
source§impl From<SparseMatIterator> for SparseMatConstIterator
impl From<SparseMatIterator> for SparseMatConstIterator
source§fn from(s: SparseMatIterator) -> Self
fn from(s: SparseMatIterator) -> Self
Converts to this type from the input type.
source§impl SparseMatConstIteratorTrait for SparseMatConstIterator
impl SparseMatConstIteratorTrait for SparseMatConstIterator
fn as_raw_mut_SparseMatConstIterator(&mut self) -> *mut c_void
fn set_hashidx(&mut self, val: size_t)
fn ptr(&mut self) -> *mut u8
unsafe fn set_ptr(&mut self, val: *mut u8)
source§fn decr(&mut self) -> Result<SparseMatConstIterator>
fn decr(&mut self) -> Result<SparseMatConstIterator>
moves iterator to the previous element
source§fn incr(&mut self) -> Result<SparseMatConstIterator>
fn incr(&mut self) -> Result<SparseMatConstIterator>
moves iterator to the next element