intersect.h 713 B

12345678910111213141516171819202122232425
  1. #ifndef IGL_INTERSECT_H
  2. #define IGL_INTERSECT_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Determine the intersect between two sets of coefficients using ==
  8. // Templates:
  9. // M matrix type that implements indexing by global index M(i)
  10. // Inputs:
  11. // A matrix of coefficients
  12. // B matrix of coefficients
  13. // Output:
  14. // C matrix of elements appearing in both A and B, C is always resized to
  15. // have a single column
  16. template <class M>
  17. IGL_INLINE void intersect(const M & A, const M & B, M & C);
  18. // Last argument as return
  19. template <class M>
  20. IGL_INLINE M intersect(const M & A, const M & B);
  21. }
  22. #ifdef IGL_HEADER_ONLY
  23. #include "intersect.cpp"
  24. #endif
  25. #endif