[−][src]Trait tract_nnef::prelude::tract_ndarray::linalg::Dot
Matrix Multiplication
For two-dimensional arrays, the dot method computes the matrix multiplication.
Associated Types
type Output
The result of the operation.
For two-dimensional arrays: a rectangular array.
Required methods
Loading content...Implementors
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 1]>>> for ArrayBase<S, Dim<[usize; 1]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
type Output = A
fn dot(&self, rhs: &ArrayBase<S2, Dim<[usize; 1]>>) -> A
[src]
Compute the dot product of one-dimensional arrays.
The dot product is a sum of the elementwise products (no conjugation of complex operands, and thus not their inner product).
Panics if the arrays are not of the same length.
Note: If enabled, uses blas dot
for elements of f32, f64
when memory
layout allows.
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 1]>>> for ArrayBase<S, Dim<[usize; 2]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
Perform the matrix multiplication of the rectangular array self
and
column vector rhs
.
The array shapes must agree in the way that
if self
is M × N, then rhs
is N.
Return a result array with shape M.
Panics if shapes are incompatible.
type Output = ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
fn dot(
&self,
rhs: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
[src]
&self,
rhs: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 2]>>> for ArrayBase<S, Dim<[usize; 1]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
type Output = ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
fn dot(
&self,
rhs: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
[src]
&self,
rhs: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
Perform the matrix multiplication of the row vector self
and
rectangular matrix rhs
.
The array shapes must agree in the way that
if self
is M, then rhs
is M × N.
Return a result array with shape N.
Panics if shapes are incompatible.
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 2]>>> for ArrayBase<S, Dim<[usize; 2]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,