Trait basic_dsp_vector::Vector

source ·
pub trait Vector<T>: MetaData + ResizeOps + FloatIndex<RangeFull, Output = [T]> + FloatIndex<Range<usize>> + FloatIndex<RangeFrom<usize>, Output = [T]> + FloatIndex<RangeTo<usize>> + FloatIndex<usize>
where T: RealNumber,
{ // Required methods fn delta(&self) -> T; fn set_delta(&mut self, delta: T); fn len(&self) -> usize; fn is_empty(&self) -> bool; fn points(&self) -> usize; fn get_multicore_settings(&self) -> &MultiCoreSettings; fn set_multicore_settings(&mut self, settings: MultiCoreSettings); fn alloc_len(&self) -> usize; }
Expand description

A trait for vector types.

Required Methods§

source

fn delta(&self) -> T

The x-axis delta. If domain is time domain then delta is in [s], in frequency domain delta is in [Hz].

source

fn set_delta(&mut self, delta: T)

Sets the x-axis delta. If domain is time domain then delta is in [s], in frequency domain delta is in [Hz].

source

fn len(&self) -> usize

The number of valid elements in the vector. This can be changed with the Resize trait.

source

fn is_empty(&self) -> bool

Indicates whether or not the vector is empty.

source

fn points(&self) -> usize

The number of valid points. If the vector is complex then every valid point consists of two floating point numbers, while for real vectors every point only consists of one floating point number.

source

fn get_multicore_settings(&self) -> &MultiCoreSettings

Gets the multi core settings which determine how the work is split between several cores if the amount of data gets larger.

source

fn set_multicore_settings(&mut self, settings: MultiCoreSettings)

Sets the multi core settings which determine how the work is split between several cores if the amount of data gets larger.

source

fn alloc_len(&self) -> usize

Gets the number of allocated elements in the underlying vector. The allocated length may be larger than the length of valid points. In most cases you likely want to have lenor points instead.

Implementors§

source§

impl<S, T, N, D> Vector<T> for DspVec<S, T, N, D>
where S: ToSlice<T>, T: RealNumber, N: NumberSpace, D: Domain,