Trait opencv::core::prelude::SparseMatTrait [−][src]
pub trait SparseMatTrait: SparseMatTraitConst {
Show 21 methods
fn as_raw_mut_SparseMat(&mut self) -> *mut c_void;
fn set_flags(&mut self, val: i32) { ... }
fn hdr(&mut self) -> SparseMat_Hdr { ... }
fn set_hdr(&mut self, val: &mut SparseMat_Hdr) { ... }
fn create(&mut self, dims: i32, _sizes: &i32, _type: i32) -> Result<()> { ... }
fn clear(&mut self) -> Result<()> { ... }
fn addref(&mut self) -> Result<()> { ... }
fn release(&mut self) -> Result<()> { ... }
fn ptr(
&mut self,
i0: i32,
create_missing: bool,
hashval: &mut size_t
) -> Result<*mut u8> { ... }
fn ptr_1(
&mut self,
i0: i32,
i1: i32,
create_missing: bool,
hashval: &mut size_t
) -> Result<*mut u8> { ... }
fn ptr_2(
&mut self,
i0: i32,
i1: i32,
i2: i32,
create_missing: bool,
hashval: &mut size_t
) -> Result<*mut u8> { ... }
fn ptr_3(
&mut self,
idx: &i32,
create_missing: bool,
hashval: &mut size_t
) -> Result<*mut u8> { ... }
fn erase(&mut self, i0: i32, i1: i32, hashval: &mut size_t) -> Result<()> { ... }
fn erase_1(
&mut self,
i0: i32,
i1: i32,
i2: i32,
hashval: &mut size_t
) -> Result<()> { ... }
fn erase_2(&mut self, idx: &i32, hashval: &mut size_t) -> Result<()> { ... }
fn begin_mut(&mut self) -> Result<SparseMatIterator> { ... }
fn end_mut(&mut self) -> Result<SparseMatIterator> { ... }
fn node_1(&mut self, nidx: size_t) -> Result<SparseMat_Node> { ... }
fn new_node(&mut self, idx: &i32, hashval: size_t) -> Result<*mut u8> { ... }
fn remove_node(
&mut self,
hidx: size_t,
nidx: size_t,
previdx: size_t
) -> Result<()> { ... }
fn resize_hash_tab(&mut self, newsize: size_t) -> Result<()> { ... }
}
Required methods
fn as_raw_mut_SparseMat(&mut self) -> *mut c_void
Provided methods
fn hdr(&mut self) -> SparseMat_Hdr
fn set_hdr(&mut self, val: &mut SparseMat_Hdr)
reallocates sparse matrix.
If the matrix already had the proper size and type, it is simply cleared with clear(), otherwise, the old matrix is released (using release()) and the new one is allocated.
sets all the sparse matrix elements to 0, which means clearing the hash table.
specialized variants for 1D, 2D, 3D cases and the generic_type one for n-D case. return pointer to the matrix element. - if the element is there (it’s non-zero), the pointer to it is returned - if it’s not there and createMissing=false, NULL pointer is returned - if it’s not there and createMissing=true, then the new element is created and initialized with 0. Pointer to it is returned - if the optional hashval pointer is not NULL, the element hash value is not computed, but *hashval is taken instead.
returns pointer to the specified element (1D case)
C++ default parameters
- hashval: 0
fn begin_mut(&mut self) -> Result<SparseMatIterator>
fn begin_mut(&mut self) -> Result<SparseMatIterator>
return the sparse matrix iterator pointing to the first sparse matrix element
returns the sparse matrix iterator at the matrix beginning
fn end_mut(&mut self) -> Result<SparseMatIterator>
fn end_mut(&mut self) -> Result<SparseMatIterator>
return the sparse matrix iterator pointing to the element following the last sparse matrix element
returns the sparse matrix iterator at the matrix end
fn node_1(&mut self, nidx: size_t) -> Result<SparseMat_Node>
fn node_1(&mut self, nidx: size_t) -> Result<SparseMat_Node>
/////////// some internal-use methods ///////////////