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.

Required Associated Types

Type of the underlying storage of a vector.

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