find_zero.h 753 B

1234567891011121314151617181920212223242526
  1. #ifndef IGL_FIND_ZERO_H
  2. #define IGL_FIND_ZERO_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. #include <Eigen/Sparse>
  6. namespace igl
  7. {
  8. /// Find the first zero (whether implicit or explicitly stored) in the
  9. /// rows/columns of a matrix.
  10. ///
  11. /// @param[in] A m by n sparse matrix
  12. /// @param[in] dim dimension along which to check for any (1 or 2)
  13. /// @param[out] I n-long vector (if dim == 1) {m means no zeros found}
  14. /// or m-long vector (if dim == 2) {n means no zeros found}
  15. ///
  16. template <typename AType, typename DerivedI>
  17. IGL_INLINE void find_zero(
  18. const Eigen::SparseMatrix<AType> & A,
  19. const int dim,
  20. Eigen::PlainObjectBase<DerivedI> & I);
  21. }
  22. #ifndef IGL_STATIC_LIBRARY
  23. # include "find_zero.cpp"
  24. #endif
  25. #endif