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
sourceimpl 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
sourceimpl Boxed for SparseMatConstIterator
impl Boxed for SparseMatConstIterator
sourceimpl Drop for SparseMatConstIterator
impl Drop for SparseMatConstIterator
sourceimpl From<SparseMatIterator> for SparseMatConstIterator
impl From<SparseMatIterator> for SparseMatConstIterator
sourcefn from(s: SparseMatIterator) -> Self
fn from(s: SparseMatIterator) -> Self
Converts to this type from the input type.
sourceimpl 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)
sourcefn decr(&mut self) -> Result<SparseMatConstIterator>
fn decr(&mut self) -> Result<SparseMatConstIterator>
moves iterator to the previous element
sourcefn incr(&mut self) -> Result<SparseMatConstIterator>
fn incr(&mut self) -> Result<SparseMatConstIterator>
moves iterator to the next element
impl Send for SparseMatConstIterator
Auto Trait Implementations
impl RefUnwindSafe for SparseMatConstIterator
impl !Sync for SparseMatConstIterator
impl Unpin for SparseMatConstIterator
impl UnwindSafe for SparseMatConstIterator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more