17 template<
typename MatrixOrMapType>
18 inline bool isInMatrix(
typename MatrixOrMapType::Scalar
const * ptr, MatrixOrMapType & M)
20 if constexpr(MatrixOrMapType::IsRowMajor)
26 auto d = ptr - M.data();
31 if(d >= M.cols() * M.colStride())
35 auto r = (d % M.colStride());
36 if(r >= M.rows() * M.rowStride())
39 return (r % M.rowStride() == 0);
47 template<
typename MatrixT,
typename MatrixOrMapType>
48 inline bool isInMatrix(
const MatrixT & A, Eigen::Index i, Eigen::Index j, MatrixOrMapType & M)
52 template<
typename Derived>
54 typename Derived::Scalar emin,
55 typename Derived::Scalar emax)
56 {
return (A.array().abs() >= emin && A.array().abs() <= emax).any(); }
Definition: GraphProbe.h:26
bool isInMatrix(typename MatrixOrMapType::Scalar const *ptr, MatrixOrMapType &M)
Definition: matrix.h:18
bool hasElemAbsInRange(const Eigen::MatrixBase< Derived > &A, typename Derived::Scalar emin, typename Derived::Scalar emax)
Definition: matrix.h:53