[−][src]Trait basic_dsp::DotProductOps
An operation which multiplies each vector element with a constant
Associated Types
type Output
Required methods
fn dot_product(&self, factor: &A) -> Self::Output
Calculates the dot product of self and factor. 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(&vector2).expect("Ignoring error handling in examples"); assert_eq!(3.0, product);
Implementors
impl<S, O, T, N, D, NO, DO> DotProductOps<O, Complex<T>, T, NO, DO> for DspVec<S, T, N, D> where
D: Domain,
DO: PosEq<D> + Domain,
N: ComplexNumberSpace,
NO: PosEq<N> + NumberSpace,
O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>,
S: ToSlice<T>,
T: RealNumber,
[src]
impl<S, O, T, N, D, NO, DO> DotProductOps<O, Complex<T>, T, NO, DO> for DspVec<S, T, N, D> where
D: Domain,
DO: PosEq<D> + Domain,
N: ComplexNumberSpace,
NO: PosEq<N> + NumberSpace,
O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>,
S: ToSlice<T>,
T: RealNumber,
type Output = Result<Complex<T>, ErrorReason>
fn dot_product(&self, factor: &O) -> Result<Complex<T>, ErrorReason> | [src] |
impl<S, O, T, N, D, NO, DO> DotProductOps<O, T, T, NO, DO> for DspVec<S, T, N, D> where
D: Domain,
DO: PosEq<D> + Domain,
N: RealNumberSpace,
NO: PosEq<N> + NumberSpace,
O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>,
S: ToSlice<T>,
T: RealNumber,
[src]
impl<S, O, T, N, D, NO, DO> DotProductOps<O, T, T, NO, DO> for DspVec<S, T, N, D> where
D: Domain,
DO: PosEq<D> + Domain,
N: RealNumberSpace,
NO: PosEq<N> + NumberSpace,
O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>,
S: ToSlice<T>,
T: RealNumber,
type Output = Result<T, ErrorReason>
fn dot_product(&self, factor: &O) -> Result<T, ErrorReason> | [src] |
impl<S, V, T, N, D> DotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<Vec<T>, ErrorReason>
fn dot_product( | [src] |
impl<S, V, T, N, D> DotProductOps<Matrix3xN<V, S, T>, T, T, N, D> for Matrix3xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<Matrix3xN<V, S, T>, T, T, N, D> for Matrix3xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<Vec<T>, ErrorReason>
fn dot_product( | [src] |
impl<S, V, T, N, D> DotProductOps<Matrix4xN<V, S, T>, T, T, N, D> for Matrix4xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<Matrix4xN<V, S, T>, T, T, N, D> for Matrix4xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<Vec<T>, ErrorReason>
fn dot_product( | [src] |
impl<S, V, T, N, D> DotProductOps<MatrixMxN<V, S, T>, T, T, N, D> for MatrixMxN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<MatrixMxN<V, S, T>, T, T, N, D> for MatrixMxN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<Vec<T>, ErrorReason>
fn dot_product( | [src] |
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<[T; 2], ErrorReason>
fn dot_product(&self, factor: &V) -> Result<[T; 2], ErrorReason> | [src] |
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix3xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix3xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<[T; 3], ErrorReason>
fn dot_product(&self, factor: &V) -> Result<[T; 3], ErrorReason> | [src] |
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix4xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix4xN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<[T; 4], ErrorReason>
fn dot_product(&self, factor: &V) -> Result<[T; 4], ErrorReason> | [src] |
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for MatrixMxN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
[src]
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for MatrixMxN<V, S, T> where
D: Domain,
N: NumberSpace,
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
type Output = Result<Vec<T>, ErrorReason>
fn dot_product(&self, factor: &V) -> Result<Vec<T>, ErrorReason> | [src] |