Efficiently normalize the row or column vectors of a dense or sparse matrix to unit length.
normalize.rows(M, …)normalize.cols(M, …)
a dense or sparse numeric matrix
A row-normalized (or column-normalized) matrix with the same dimensions as \(M\).
Note that the generalized Minkowski length measure for \(p < 1\) cannot be normalized with normalize.rows
because it doesn't satisfy the homogeneity axiom. The Hamming length obtained for \(p = 0\) cannot be normalized at all. See rowNorms
for more information.
See rowNorms
for details on available norms and their parameters.