Example #1
0
void normalize_columns_l1 (MatrixXf & A)
{
  const int I = A.rows();
  const int J = A.cols();

  for (int j = 0; j < J; ++j) {

    Vector<float> col(I, & A.coeffRef(0,j));

    col /= sum(col);
  }
}