#include "normalize_row_sums.h" template IGL_INLINE void igl::normalize_row_sums( const Eigen::PlainObjectBase& A, Eigen::PlainObjectBase & B) { // Resize output B.derived().resize(A.rows(),A.cols()); // loop over rows for(int i = 0; i < A.rows();i++) { typename DerivedV::Scalar sum = A.row(i).sum(); assert(sum != 0); B.row(i) = A.row(i).array()/sum; } } #ifndef IGL_HEADER_ONLY // Explicit template specialization // generated by autoexplicit.sh template void igl::normalize_row_sums >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::normalize_row_sums >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::normalize_row_sums >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif