normalize_row_lengths.h 742 B

12345678910111213141516171819202122232425262728
  1. #ifndef IGL_NORMALIZE_ROW_LENGTHS_H
  2. #define IGL_NORMALIZE_ROW_LENGTHS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. // History:
  6. // March 24, 2012: Alec changed function name from normalize_rows to
  7. // normalize_row_lengths to avoid confusion with normalize_row_sums
  8. namespace igl
  9. {
  10. // Normalize the rows in A so that their lengths are each 1 and place the new
  11. // entries in B
  12. // Inputs:
  13. // A #rows by k input matrix
  14. // Outputs:
  15. // B #rows by k input matrix, can be the same as A
  16. template <typename DerivedV>
  17. IGL_INLINE void normalize_row_lengths(
  18. const Eigen::PlainObjectBase<DerivedV>& A,
  19. Eigen::PlainObjectBase<DerivedV> & B);
  20. }
  21. #ifdef IGL_HEADER_ONLY
  22. # include "normalize_row_lengths.cpp"
  23. #endif
  24. #endif