7 #ifndef NIHU_MATRIX_FREE_HPP_INCLUDED
8 #define NIHU_MATRIX_FREE_HPP_INCLUDED
11 #include "util/real_part_type.hpp"
13 #include <Eigen/SparseCore>
16 #include <type_traits>
25 template <
class FmmMatrix>
34 template<
class FmmMatrix>
36 :
public Eigen::internal::traits<Eigen::SparseMatrix<typename FmmMatrix::scalar_t> >
53 template <
class FmmMatrix>
55 :
public Eigen::EigenBase<matrix_free<FmmMatrix> >
58 typedef FmmMatrix fmm_matrix_t;
59 typedef typename fmm_matrix_t::scalar_t scalar_t;
61 typedef scalar_t Scalar;
62 typedef typename NiHu::real_part_type<Scalar>::type RealScalar;
63 typedef int StorageIndex;
65 ColsAtCompileTime = Eigen::Dynamic,
66 MaxColsAtCompileTime = Eigen::Dynamic,
70 typedef Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> vector_t;
98 typename FmmMatrix::response_t
108 return m_mat.get_diagonal();
122 template <
class FmmMatrix>
123 matrix_free<FmmMatrix>