Function Utils::resizePatch(const arma::vec&, const unsigned int)

Function Documentation

arma::vec Utils::resizePatch(const arma::vec &mat, const unsigned int nR)

Armadillo arma::mat::resize() is not robust as it initializes garbage values to new columns. This fixes the problem by creating new columns with guaranteed zero values. For arma::sp_mat.

Parameters
  • mat – Input vector (row, or column)

  • nR – Number of rows for the output

Returns

The resized mat