11 #ifndef BEMBEL_SRC_H2MATRIX_H2MATRIXBASE_HPP_
12 #define BEMBEL_SRC_H2MATRIX_H2MATRIXBASE_HPP_
16 template <
typename Derived>
21 template <
typename Derived>
24 typedef typename internal::traits<Derived>::Scalar Scalar;
25 typedef typename internal::ref_selector<Derived>::type Nested;
27 typedef Scalar CoeffReturnType;
30 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
31 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
32 SizeAtCompileTime = (internal::size_at_compile_time<
33 internal::traits<Derived>::RowsAtCompileTime,
34 internal::traits<Derived>::ColsAtCompileTime>::ret),
35 MaxRowsAtCompileTime = RowsAtCompileTime,
36 MaxColsAtCompileTime = ColsAtCompileTime,
37 MaxSizeAtCompileTime =
38 (internal::size_at_compile_time<MaxRowsAtCompileTime,
39 MaxColsAtCompileTime>::ret),
40 IsVectorAtCompileTime =
false
43 inline const Derived& derived()
const {
44 return *
static_cast<const Derived*
>(
this);
46 inline Derived& derived() {
return *
static_cast<Derived*
>(
this); }
48 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::H2MatrixBase
49 #include "Eigen/src/plugins/CommonCwiseBinaryOps.h"
52 template <
typename OtherDerived>
53 const Product<Derived, OtherDerived> operator*(
54 const MatrixBase<OtherDerived>& other)
const {
55 return Product<Derived, OtherDerived>(derived(), other.derived());
60 template <
typename OtherDerived>
61 Derived& operator+=(
const SparseMatrixBase<OtherDerived>& other);
62 template <
typename OtherDerived>
63 Derived& operator-=(
const SparseMatrixBase<OtherDerived>& other);
64 template <
typename OtherDerived>
65 Derived& operator+=(
const DiagonalBase<OtherDerived>& other);
66 template <
typename OtherDerived>
67 Derived& operator-=(
const DiagonalBase<OtherDerived>& other);
68 template <
typename OtherDerived>
69 Derived& operator+=(
const EigenBase<OtherDerived>& other);
70 template <
typename OtherDerived>
71 Derived& operator-=(
const EigenBase<OtherDerived>& other);
73 Derived& operator*=(
const Scalar& other);
74 Derived& operator/=(
const Scalar& other);
80 template <
typename Derived>
81 struct evaluator<
H2MatrixBase<Derived>> : evaluator_base<Derived> {
82 typedef typename Derived::Scalar Scalar;
84 enum { CoeffReadCost = NumTraits<Scalar>::ReadCost, Flags = Derived::Flags };
86 evaluator() : m_matrix(0), m_zero(0) {
87 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
89 explicit evaluator(
const Derived& mat) : m_matrix(&mat), m_zero(0) {
90 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
93 operator Derived&() {
return m_matrix->const_cast_derived(); }
94 operator const Derived&()
const {
return *m_matrix; }
96 const Derived* m_matrix;
Hierarchical Matrix class, which extends the EigenBase class.