Struct basic_dsp_vector::combined_ops::MultiOperation2 [−][src]
pub struct MultiOperation2<S, T, NO1, DO1, NO2, DO2> where
S: ToSlice<T>,
T: RealNumber,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain, { /* fields omitted */ }
A multi operation which holds a vector and records all changes
which need to be done to the vectors. By calling get
on the struct
all operations will be executed in one run.
Methods
impl<S, T, NO1, DO1, NO2, DO2> MultiOperation2<S, T, NO1, DO1, NO2, DO2> where
S: ToSliceMut<T>,
DspVec<S, T, NO1, DO1>: RededicateForceOps<DspVec<S, T, RealOrComplexData, TimeOrFrequencyData>>,
DspVec<S, T, NO2, DO2>: RededicateForceOps<DspVec<S, T, RealOrComplexData, TimeOrFrequencyData>>,
T: RealNumber,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
[src]
impl<S, T, NO1, DO1, NO2, DO2> MultiOperation2<S, T, NO1, DO1, NO2, DO2> where
S: ToSliceMut<T>,
DspVec<S, T, NO1, DO1>: RededicateForceOps<DspVec<S, T, RealOrComplexData, TimeOrFrequencyData>>,
DspVec<S, T, NO2, DO2>: RededicateForceOps<DspVec<S, T, RealOrComplexData, TimeOrFrequencyData>>,
T: RealNumber,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
Holds two vectors and records all operations which shall be done on the
vectors. A call to get
then runs all recorded operations on the vectors
and returns them. See the modules description for why this can be beneficial.
pub fn get<B>(
self,
buffer: &mut B
) -> Result<(DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>), (ErrorReason, DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>)> where
B: for<'a> Buffer<'a, S, T>,
[src]
pub fn get<B>(
self,
buffer: &mut B
) -> Result<(DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>), (ErrorReason, DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>)> where
B: for<'a> Buffer<'a, S, T>,
Executes all recorded operations on the stored vector.
pub fn add_ops<F, NT1, DT1, NT2, DT2>(
self,
operation: F
) -> MultiOperation2<S, T, NT1, DT1, NT2, DT2> where
F: Fn(Identifier<T, NO1, DO1>, Identifier<T, NO2, DO2>) -> (Identifier<T, NT1, DT1>, Identifier<T, NT2, DT2>),
DT1: Domain,
NT1: NumberSpace,
DT2: Domain,
NT2: NumberSpace,
[src]
pub fn add_ops<F, NT1, DT1, NT2, DT2>(
self,
operation: F
) -> MultiOperation2<S, T, NT1, DT1, NT2, DT2> where
F: Fn(Identifier<T, NO1, DO1>, Identifier<T, NO2, DO2>) -> (Identifier<T, NT1, DT1>, Identifier<T, NT2, DT2>),
DT1: Domain,
NT1: NumberSpace,
DT2: Domain,
NT2: NumberSpace,
Adds new operations which will be executed with the next call to get
As a background: The function operation
will be executed immediately.
It only operated on Identifier
types and these serve as
placeholder for vectors. Every operation done to an Identifier
is recorded and will be executed on vectors if get
is called.
pub fn add_enum_op(&mut self, op: Operation<T>)
[src]
pub fn add_enum_op(&mut self, op: Operation<T>)
Allows to directly push an Operation
enum to a MultiOperation1
.
This mainly exists as interop between Rust and other languages.