35 const Col<data_t> diag_reciprocal;
38 template<
typename Container>
explicit Jacobi(
const Container& in_mat)
40 , diag_reciprocal(1. / Col<data_t>(in_mat.diag())) {}
42 [[nodiscard]] Col<data_t>
apply(
const Col<data_t>&)
override;
48 for(
auto I = 0llu; I < in.n_elem; I += diag_reciprocal.n_elem) out.subvec(I, arma::size(diag_reciprocal)) %= diag_reciprocal;
A Jacobi class.
Definition: Jacobi.hpp:34
Jacobi(const Container &in_mat)
Definition: Jacobi.hpp:38
A Preconditioner class.
Definition: Preconditioner.hpp:34
Col< data_t > apply(const Col< data_t > &) override
Definition: Jacobi.hpp:45