concat.h 837 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef IGL_CONCAT_H
  2. #define IGL_CONCAT_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // Concatenates dense matrices
  8. // Templates:
  9. // T should be a eigen matrix primitive type like int or double
  10. // Inputs:
  11. // A first matrix
  12. // B second matrix
  13. // horiz if true, matrices are concatenated horizontally
  14. // Output:
  15. // O if horiz = false return [A;B] else [A,B]
  16. template <typename T>
  17. IGL_INLINE void concat(
  18. const T A,
  19. const T B,
  20. const bool horiz,
  21. T& O);
  22. template <typename T>
  23. IGL_INLINE T concat(
  24. const T A,
  25. const T B,
  26. bool horiz = false
  27. );
  28. }
  29. #ifdef IGL_HEADER_ONLY
  30. # include "concat.cpp"
  31. #endif
  32. #endif