any_of.cpp 711 B

1234567891011121314151617181920
  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 "any_of.h"
  9. #include <Eigen/Core>
  10. template <typename Mat>
  11. IGL_INLINE bool igl::any_of(const Mat & S)
  12. {
  13. return std::any_of(S.data(),S.data()+S.size(),[](bool s){return s;});
  14. }
  15. #ifdef IGL_STATIC_LIBRARY
  16. // Explicit template specialization
  17. template bool igl::any_of<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::Matrix<int, -1, 1, 0, -1, 1> const&);
  18. #endif