5#ifndef __eigenpy_utils_is_approx_hpp__ 6#define __eigenpy_utils_is_approx_hpp__ 9#include <Eigen/SparseCore> 12template <
typename MatrixType1,
typename MatrixType2>
13EIGEN_DONT_INLINE
bool is_approx(
const Eigen::MatrixBase<MatrixType1>& mat1,
14 const Eigen::MatrixBase<MatrixType2>& mat2,
15 const typename MatrixType1::RealScalar& prec) {
16 return mat1.isApprox(mat2, prec);
19template <
typename MatrixType1,
typename MatrixType2>
20EIGEN_DONT_INLINE
bool is_approx(
const Eigen::MatrixBase<MatrixType1>& mat1,
21 const Eigen::MatrixBase<MatrixType2>& mat2) {
24 Eigen::NumTraits<typename MatrixType1::RealScalar>::dummy_precision());
27template <
typename MatrixType1,
typename MatrixType2>
28EIGEN_DONT_INLINE
bool is_approx(
29 const Eigen::SparseMatrixBase<MatrixType1>& mat1,
30 const Eigen::SparseMatrixBase<MatrixType2>& mat2,
31 const typename MatrixType1::RealScalar& prec) {
32 return mat1.isApprox(mat2, prec);
35template <
typename MatrixType1,
typename MatrixType2>
36EIGEN_DONT_INLINE
bool is_approx(
37 const Eigen::SparseMatrixBase<MatrixType1>& mat1,
38 const Eigen::SparseMatrixBase<MatrixType2>& mat2) {
41 Eigen::NumTraits<typename MatrixType1::RealScalar>::dummy_precision());