TFVectorTrait

Trait TFVectorTrait 

Source
pub trait TFVectorTrait<N>
where N: Num + Copy,
{
Show 14 methods // Required methods fn len(&self) -> u32; fn nnz(&self) -> u32; fn term_sum(&self) -> u32; fn new() -> Self; fn new_with_capacity(capacity: u32) -> Self; fn shrink_to_fit(&mut self); fn raw_iter(&self) -> RawTFVectorIter<'_, N> ; unsafe fn from_vec( ind_vec: Vec<u32>, val_vec: Vec<N>, len: u32, term_sum: u32, ) -> Self; unsafe fn ind_ptr(&self) -> *mut u32; unsafe fn val_ptr(&self) -> *mut N; // Provided methods unsafe fn power_jump_search( &self, target: u32, start: usize, ) -> Option<(N, usize)> where N: Copy { ... } fn get_power_jump(&self, target: u32, cut_down: &mut usize) -> Option<N> where N: Copy { ... } fn as_val_slice(&self) -> &[N] { ... } fn as_ind_slice(&self) -> &[u32] { ... }
}

Required Methods§

Source

fn len(&self) -> u32

Source

fn nnz(&self) -> u32

Source

fn term_sum(&self) -> u32

Source

fn new() -> Self

Source

fn new_with_capacity(capacity: u32) -> Self

Source

fn shrink_to_fit(&mut self)

Source

fn raw_iter(&self) -> RawTFVectorIter<'_, N>

Source

unsafe fn from_vec( ind_vec: Vec<u32>, val_vec: Vec<N>, len: u32, term_sum: u32, ) -> Self

Source

unsafe fn ind_ptr(&self) -> *mut u32

Source

unsafe fn val_ptr(&self) -> *mut N

Provided Methods§

Power Jump Search Returns Some((value, sp_vec_raw_ind)) if found, None otherwise

Source

fn get_power_jump(&self, target: u32, cut_down: &mut usize) -> Option<N>
where N: Copy,

Source

fn as_val_slice(&self) -> &[N]

Source

fn as_ind_slice(&self) -> &[u32]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<N> TFVectorTrait<N> for TFVector<N>
where N: Num + Copy,