Trait basic_dsp::VectorIter
[−]
[src]
pub trait VectorIter<T>: Sized where T: Sized { fn map_inplace<A, F>(self, argument: A, map: F) -> VecResult<Self> where A: Sync + Copy + Send, F: Fn(T, usize, A) -> T + 'static + Sync; fn map_aggregate<A, FMap, FAggr, R>(&self, argument: A, map: FMap, aggregate: FAggr) -> ScalarResult<R> where A: Sync + Copy + Send, FMap: Fn(T, usize, A) -> R + 'static + Sync, FAggr: Fn(R, R) -> R + 'static + Sync + Send, R: Send; }
Operations which allow to iterate over the vector and to derive results or to change the vector.
Required Methods
fn map_inplace<A, F>(self, argument: A, map: F) -> VecResult<Self> where A: Sync + Copy + Send, F: Fn(T, usize, A) -> T + 'static + Sync
Transforms all vector elements using the function map
.
fn map_aggregate<A, FMap, FAggr, R>(&self, argument: A, map: FMap, aggregate: FAggr) -> ScalarResult<R> where A: Sync + Copy + Send, FMap: Fn(T, usize, A) -> R + 'static + Sync, FAggr: Fn(R, R) -> R + 'static + Sync + Send, R: Send
Transforms all vector elements using the function map
and then aggregates
all the results with aggregate
. aggregate
must be a commutativity and associativity;
that's because there is no guarantee that the numbers will be aggregated in any deterministic order.
Implementors
impl VectorIter<f32> for GenericDataVector<f32>
impl VectorIter<f64> for GenericDataVector<f64>
impl VectorIter<Complex<f32>> for GenericDataVector<f32>
impl VectorIter<Complex<f64>> for GenericDataVector<f64>
impl VectorIter<f32> for RealTimeVector<f32>
impl VectorIter<f64> for RealTimeVector<f64>
impl VectorIter<f32> for RealFreqVector<f32>
impl VectorIter<f64> for RealFreqVector<f64>
impl VectorIter<Complex<f32>> for ComplexTimeVector<f32>
impl VectorIter<Complex<f64>> for ComplexTimeVector<f64>
impl VectorIter<Complex<f32>> for ComplexFreqVector<f32>
impl VectorIter<Complex<f64>> for ComplexFreqVector<f64>