Function uw12::linalg::reshape_col

Function Documentation

inline Mat uw12::linalg::reshape_col(const Mat &mat, const size_t col_idx, const size_t n_row, const size_t n_col, const bool copy_data = false)

Reshape a column of a matrix to a new matrix

Parameters
  • mat – Matrix containing chosen column (must have n_row * n_col rows)

  • col_idx – Index of chosen column (must be a column of matrix mat)

  • n_row – Number of rows of output matrix

  • n_col – Number of columns of output matrix

  • copy_data – Whether to copy the data

Returns

Matrix of size n_row * n_col