Trait basic_dsp_vector::PreciseDotProductOps
[−]
[src]
pub trait PreciseDotProductOps<R, A>: Sized where
R: Sized, { type Output; fn dot_product_prec(&self, factor: &A) -> Self::Output; }
An operation which multiplies each vector element with a constant
Associated Types
type Output
Required Methods
fn dot_product_prec(&self, factor: &A) -> Self::Output
Calculates the dot product of self and factor using a more precise but slower algorithm. Self and factor remain unchanged.
Example
use basic_dsp_vector::*; let vector1 = vec!(2.0, 1.0, -1.0, 4.0).to_real_time_vec(); let vector2 = vec!(3.0, 4.0, -1.0, -2.0).to_real_time_vec(); let product = vector1.dot_product_prec(&vector2).expect("Ignoring error handling in examples"); assert_eq!(3.0, product);
Implementors
impl<S, T, N, D> PreciseDotProductOps<T, DspVec<S, T, N, D>> for DspVec<S, T, N, D> where
S: ToSlice<T>,
T: RealNumber,
N: RealNumberSpace,
D: Domain,impl<S, T, N, D> PreciseDotProductOps<Complex<T>, DspVec<S, T, N, D>> for DspVec<S, T, N, D> where
S: ToSlice<T>,
T: RealNumber,
N: ComplexNumberSpace,
D: Domain,