[−][src]Trait basic_dsp::SplitOps
Splits the data into several smaller pieces of equal size.
Required methods
fn split_into(&self, targets: &mut [&mut Self]) -> Result<(), ErrorReason>
Splits the vector into several smaller vectors. self.len() must be dividable by
targets.len() without a remainder and this condition must be true too
targets.len() > 0.
Failures
TransRes may report the following ErrorReason members:
InvalidArgumentLength:self.points()isn't dividable bytargets.len()
Example
use basic_dsp_vector::*; let mut vector = vec!(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0).to_real_time_vec(); let mut split = &mut [&mut Vec::new().to_real_time_vec(), &mut Vec::new().to_real_time_vec()]; vector.split_into(split).expect("Ignoring error handling in examples"); assert_eq!([1.0, 3.0, 5.0, 7.0, 9.0], split[0][..]);
Implementors
impl<S, T, N, D> SplitOps for DspVec<S, T, N, D> where
D: Domain,
N: NumberSpace,
S: ToSliceMut<T>,
T: RealNumber, [src]
D: Domain,
N: NumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
fn split_into(
&self,
targets: &mut [&mut DspVec<S, T, N, D>]
) -> Result<(), ErrorReason>[src]
&self,
targets: &mut [&mut DspVec<S, T, N, D>]
) -> Result<(), ErrorReason>