Function uw12::linalg::each_col

Function Documentation

inline Mat uw12::linalg::each_col(const Mat &mat, const Vec &vec)

Multiply each column in a matrix by a column vector element-wise

For each column in matrix mat multiply element-wise by vector vec

Parameters
  • mat – Matrix of size n_row * n_col

  • vec – Vector of length n_row

Returns

Matrix of size n_row * n_col