is_sparse.cpp 967 B

12345678910111213141516171819202122232425262728
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #include "is_sparse.h"
  9. template <typename T>
  10. IGL_INLINE bool igl::is_sparse(
  11. const Eigen::SparseMatrix<T> & A)
  12. {
  13. return true;
  14. }
  15. template <typename DerivedA>
  16. IGL_INLINE bool igl::is_sparse(
  17. const Eigen::PlainObjectBase<DerivedA>& A)
  18. {
  19. return false;
  20. }
  21. #ifdef IGL_STATIC_LIBRARY
  22. // Explicit template specialization
  23. // generated by autoexplicit.sh
  24. template bool igl::is_sparse<double>(Eigen::SparseMatrix<double, 0, int> const&);
  25. // generated by autoexplicit.sh
  26. template bool igl::is_sparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&);
  27. #endif