full.h 846 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef IGL_FULL_H
  2. #define IGL_FULL_H
  3. #include "igl_inline.h"
  4. #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
  5. #include <Eigen/Dense>
  6. #include <Eigen/Sparse>
  7. namespace igl
  8. {
  9. // Convert a sparsematrix into a full one
  10. // Templates:
  11. // T should be a eigen sparse matrix primitive type like int or double
  12. // Input:
  13. // A m by n sparse matrix
  14. // Output:
  15. // B m by n dense/full matrix
  16. template <typename T,typename DerivedB>
  17. IGL_INLINE void full(
  18. const Eigen::SparseMatrix<T> & A,
  19. Eigen::PlainObjectBase<DerivedB> & B);
  20. // If already full then this will just be a copy by assignment
  21. template <typename DerivedA,typename DerivedB>
  22. IGL_INLINE void full(
  23. const Eigen::PlainObjectBase<DerivedA>& A,
  24. Eigen::PlainObjectBase<DerivedB>& B);
  25. }
  26. #ifdef IGL_HEADER_ONLY
  27. # include "full.cpp"
  28. #endif
  29. #endif