pub fn vecmat_mul<const K: usize, const N: usize, TAPE: Tape>(
    lhs: Tensor1D<K, TAPE>,
    rhs: &Tensor2D<K, N, NoneTape>
) -> Tensor1D<N, TAPE>
Expand description

vector * matrix multiplication.

This is equivalent to matrix multiplication with M == 1.

Generics

  • K: number of columns of lhs and number of rows of rhs.
  • N: Number of columns of rhs.

Arguments

  • lhs - a 1d tensor representing a 1xK matrix
  • rhs - a 2d tensor representing a KxN matrix

Returns a 1d tensor representing an 1xN matrix.

Examples

let x: Tensor1D<2> = Tensor1D::zeros();
let y: Tensor2D<2, 4> = Tensor2D::zeros();
let result: Tensor1D<4> = vecmat_mul(x, &y);