is_sparse.cpp 893 B

123456789101112131415161718192021222324
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  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(const Eigen::SparseMatrix<T> &)
  11. {
  12. return true;
  13. }
  14. template <typename DerivedA>
  15. IGL_INLINE bool igl::is_sparse(const Eigen::PlainObjectBase<DerivedA>& )
  16. {
  17. return false;
  18. }
  19. #ifdef IGL_STATIC_LIBRARY
  20. // Explicit template instantiation
  21. template bool igl::is_sparse<double>(Eigen::SparseMatrix<double, 0, int> const&);
  22. template bool igl::is_sparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&);
  23. #endif