face_occurences.h 622 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_FACE_OCCURENCES
  2. #define IGL_FACE_OCCURENCES
  3. #include "igl_inline.h"
  4. #include <vector>
  5. namespace igl
  6. {
  7. // Count the occruances of each face (row) in a list of face indices
  8. // (irrespecitive of order)
  9. // Inputs:
  10. // F #F by simplex-size
  11. // Outputs
  12. // C #F list of counts
  13. // Known bug: triangles/tets only (where ignoring order still gives simplex)
  14. template <typename IntegerF, typename IntegerC>
  15. IGL_INLINE void face_occurences(
  16. const std::vector<std::vector<IntegerF> > & F,
  17. std::vector<IntegerC> & C);
  18. }
  19. #ifdef IGL_HEADER_ONLY
  20. # include "face_occurences.cpp"
  21. #endif
  22. #endif