Struct opencv::core::SparseMatIterator
source · pub struct SparseMatIterator { /* private fields */ }
Expand description
Read-write Sparse Matrix Iterator
The class is similar to cv::SparseMatConstIterator, but can be used for in-place modification of the matrix elements.
Implementations§
source§impl SparseMatIterator
impl SparseMatIterator
sourcepub fn default() -> Result<SparseMatIterator>
pub fn default() -> Result<SparseMatIterator>
the default constructor
sourcepub fn new(_m: &mut impl SparseMatTrait) -> Result<SparseMatIterator>
pub fn new(_m: &mut impl SparseMatTrait) -> Result<SparseMatIterator>
the full constructor setting the iterator to the first sparse matrix element
sourcepub fn copy(it: &impl SparseMatIteratorTraitConst) -> Result<SparseMatIterator>
pub fn copy(it: &impl SparseMatIteratorTraitConst) -> Result<SparseMatIterator>
the copy constructor
Trait Implementations§
source§impl Boxed for SparseMatIterator
impl Boxed for SparseMatIterator
source§unsafe fn from_raw(
ptr: <SparseMatIterator as OpenCVFromExtern>::ExternReceive
) -> Self
unsafe fn from_raw( ptr: <SparseMatIterator as OpenCVFromExtern>::ExternReceive ) -> Self
Wrap the specified raw pointer Read more
source§fn into_raw(
self
) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self ) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
source§fn as_raw(&self) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
source§fn as_raw_mut(
&mut self
) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self ) -> <SparseMatIterator as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
source§impl Debug for SparseMatIterator
impl Debug for SparseMatIterator
source§impl Drop for SparseMatIterator
impl Drop for SparseMatIterator
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 SparseMatIterator
impl SparseMatConstIteratorTrait for SparseMatIterator
fn as_raw_mut_SparseMatConstIterator(&mut self) -> *mut c_void
fn set_hashidx(&mut self, val: size_t)
fn ptr_mut(&mut self) -> *mut u8
unsafe fn set_ptr(&mut self, val: *const u8)
source§fn set(&mut self, it: &impl SparseMatConstIteratorTraitConst) -> Result<()>
fn set(&mut self, it: &impl SparseMatConstIteratorTraitConst) -> Result<()>
the assignment operator
source§fn incr(&mut self) -> Result<SparseMatConstIterator>
fn incr(&mut self) -> Result<SparseMatConstIterator>
moves iterator to the next element
source§impl SparseMatIteratorTraitConst for SparseMatIterator
impl SparseMatIteratorTraitConst for SparseMatIterator
fn as_raw_SparseMatIterator(&self) -> *const c_void
source§fn node(&self) -> Result<SparseMat_Node>
fn node(&self) -> Result<SparseMat_Node>
returns pointer to the current sparse matrix node. it.node->idx is the index of the current element (do not modify it!)
impl Send for SparseMatIterator
Auto Trait Implementations§
impl Freeze for SparseMatIterator
impl RefUnwindSafe for SparseMatIterator
impl !Sync for SparseMatIterator
impl Unpin for SparseMatIterator
impl UnwindSafe for SparseMatIterator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance
sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold
. Read more