all.cpp 737 B

1234567891011121314151617181920212223242526
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 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 "all.h"
  9. #include "redux.h"
  10. template <typename AType, typename DerivedB>
  11. IGL_INLINE void igl::all(
  12. const Eigen::SparseMatrix<AType> & A,
  13. const int dim,
  14. Eigen::PlainObjectBase<DerivedB>& B)
  15. {
  16. typedef typename DerivedB::Scalar Scalar;
  17. igl::redux(A,dim,[](Scalar a, Scalar b){ return a && b!=0;},B);
  18. }
  19. #ifdef IGL_STATIC_LIBRARY
  20. // Explicit template instantiation
  21. #endif