Trait basic_dsp::ToDspVector
source · [−]pub trait ToDspVector<T>: ToSlice<T>where
T: RealNumber,{
fn to_gen_dsp_vec(
self,
is_complex: bool,
domain: DataDomain
) -> DspVec<Self, T, RealOrComplex, TimeOrFreq>;
fn to_dsp_vec<N, D>(
self,
meta_data: &TypeMetaData<T, N, D>
) -> DspVec<Self, T, N, D>
where
N: NumberSpace,
D: Domain;
}
Expand description
Conversion from a generic data type into a dsp vector which tracks
its meta information (domain and number space)
only at runtime. See ToRealVector
and
ToComplexVector
for alternatives which track most of the meta data
with the type system and therefore avoid runtime errors.
Required Methods
sourcefn to_gen_dsp_vec(
self,
is_complex: bool,
domain: DataDomain
) -> DspVec<Self, T, RealOrComplex, TimeOrFreq>
fn to_gen_dsp_vec(
self,
is_complex: bool,
domain: DataDomain
) -> DspVec<Self, T, RealOrComplex, TimeOrFreq>
Create a new generic vector.
delta
can be changed after construction with a call of set_delta
.
For complex vectors with an odd length the resulting value will have a zero length.
sourcefn to_dsp_vec<N, D>(
self,
meta_data: &TypeMetaData<T, N, D>
) -> DspVec<Self, T, N, D>where
N: NumberSpace,
D: Domain,
fn to_dsp_vec<N, D>(
self,
meta_data: &TypeMetaData<T, N, D>
) -> DspVec<Self, T, N, D>where
N: NumberSpace,
D: Domain,
Create a new vector from the given meta data. The meta data can be retrieved from an existing vector. If no existing vector is available then one of the other constructor methods should be used.