Trait basic_dsp_vector::FromVector [−][src]
pub trait FromVector<T> where
T: RealNumber, { type Output; fn get(self) -> (Self::Output, usize); }
Expand description
Retrieves the underlying storage from a vector.
If you are working with std::vec::Vec then it’s recommended to use
Into instead of this one, as
it’s more straightforward to use.
Associated Types
Required methods
If you are working with std::vec::Vec then it’s recommended to use
Into instead of this one, as
it’s more straightforward to use.
Gets the underlying storage and the number of elements which
contain valid data. Therefore a caller should only use the first valid data elements from the storage.
The remaining elements (if there are any) might have been allocated during the calculations but contain
no useful information.
Example
use basic_dsp_vector::*; let v: Vec<Complex<f64>> = vec!(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0)); let v: DspVec<Vec<f64>, f64, meta::Complex, meta::Time> = v.to_complex_time_vec(); let (v, p): (Vec<Complex<f64>>, usize) = v.get(); assert_eq!(2, p); assert_eq!(vec!(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0)), v);
Implementors
impl<'a, T, D> FromVector<T> for DspVec<&'a [T], T, Complex, D> where
T: RealNumber,
D: Domain, [src]
impl<'a, T, D> FromVector<T> for DspVec<&'a [T], T, Complex, D> where
T: RealNumber,
D: Domain, [src]impl<'a, T, D> FromVector<T> for DspVec<&'a mut [T], T, Complex, D> where
T: RealNumber,
D: Domain, [src]
impl<'a, T, D> FromVector<T> for DspVec<&'a mut [T], T, Complex, D> where
T: RealNumber,
D: Domain, [src]impl<S, T, D> FromVector<T> for DspVec<S, T, Real, D> where
S: ToSlice<T>,
T: RealNumber,
D: Domain, [src]
impl<S, T, D> FromVector<T> for DspVec<S, T, Real, D> where
S: ToSlice<T>,
T: RealNumber,
D: Domain, [src]