is_symmetric.h 479 B

1234567891011121314151617181920
  1. #ifndef IGL_IS_SYMMETRIC_H
  2. #define IGL_IS_SYMMETRIC_H
  3. #include "igl_inline.h"
  4. #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
  5. #include <Eigen/Sparse>
  6. namespace igl
  7. {
  8. // Returns true if the given matrix is symmetric
  9. // Inputs:
  10. // A m by m matrix
  11. // Returns true if the matrix is square and symmetric
  12. template <typename T>
  13. IGL_INLINE bool is_symmetric(const Eigen::SparseMatrix<T>& A);
  14. }
  15. #ifdef IGL_HEADER_ONLY
  16. # include "is_symmetric.cpp"
  17. #endif
  18. #endif