12 #ifndef BEMBEL_SRC_H2MATRIX_TREELEAF_HPP_
13 #define BEMBEL_SRC_H2MATRIX_TREELEAF_HPP_
19 template <
typename Derived>
32 is_low_rank_(false) {}
40 is_low_rank_(other.is_low_rank_) {}
45 : F_(std::move(other.F_)),
46 L_(std::move(other.L_)),
47 R_(std::move(other.R_)),
48 is_low_rank_(other.is_low_rank_) {}
53 template <
typename otherDerived>
54 TreeLeaf(
const Eigen::MatrixBase<otherDerived> &L,
55 const Eigen::MatrixBase<otherDerived> &R)
56 : F_(Derived(0, 0)), L_(L), R_(R), is_low_rank_(true) {}
61 template <
typename otherDerived>
62 explicit TreeLeaf(
const Eigen::MatrixBase<otherDerived> &F)
63 : F_(F), L_(Derived(0, 0)), R_(Derived(0, 0)), is_low_rank_(false) {}
68 : F_(Derived(0, 0)), L_(L), R_(R), is_low_rank_(true) {}
73 : F_(F), L_(Derived(0, 0)), R_(Derived(0, 0)), is_low_rank_(false) {}
77 bool is_low_rank() {
return is_low_rank_; }
78 Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
82 Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
86 Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
90 const Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
94 const Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
98 Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
105 void set_low_rank_flag(
bool flag) {
109 void set_F(
const Eigen::Matrix<
typename Derived::Scalar, Eigen::Dynamic,
110 Eigen::Dynamic> &F) {
113 void set_L(
const Eigen::Matrix<
typename Derived::Scalar, Eigen::Dynamic,
114 Eigen::Dynamic> &L) {
117 void set_R(
const Eigen::Matrix<
typename Derived::Scalar, Eigen::Dynamic,
118 Eigen::Dynamic> &R) {
131 std::swap(is_low_rank_, other.is_low_rank_);
141 Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic> F_,
This class is managing the leafs of the H2Matrix BlockClusterTree.
TreeLeaf & operator=(TreeLeaf other)
assignment operator, works for copy and move assignment
TreeLeaf(Derived &&F)
full move constructor
TreeLeaf(Derived &&L, Derived &&R)
lowRank move constructor
TreeLeaf(const TreeLeaf &other)
copy constructor
TreeLeaf(TreeLeaf &&other)
move constructor
TreeLeaf(const Eigen::MatrixBase< otherDerived > &L, const Eigen::MatrixBase< otherDerived > &R)
lowRank constructor whatever Eigen object is put in here will be evaluated
TreeLeaf(void)
void constructor
TreeLeaf(const Eigen::MatrixBase< otherDerived > &F)
full constructor whatever Eigen object is put in here will be evaluated
Routines for the evalutation of pointwise errors.