1 #include "../../include/monolish_blas.hpp"
2 #include "../../include/monolish_vml.hpp"
3 #include "../internal/monolish_internal.hpp"
12 std::runtime_error(
"equation error, maxiter\n");
15 std::runtime_error(
"equation error, breakdown\n");
18 std::runtime_error(
"equation error, size error\n");
21 std::runtime_error(
"equation error, resudual is nan\n");
24 std::runtime_error(
"equation error, this solver is not impl.\n");
32 template <
typename T,
typename V1,
typename V2>
33 T get_residual_l2_core(
const matrix::Dense<T> &A,
const V1 &x,
const V2 &y) {
45 template <
typename T,
typename V1,
typename V2>
46 T get_residual_l2_core(
const matrix::CRS<T> &A,
const V1 &x,
const V2 &y) {
49 vector<T> tmp(x.size());
58 template <
typename T,
typename V1,
typename V2>
59 T get_residual_l2_core(
const matrix::LinearOperator<T> &A,
const V1 &x,
63 vector<T> tmp(x.size());
74 return get_residual_l2_core(A, x, y);
78 return get_residual_l2_core(A, x, y);
82 return get_residual_l2_core(A, x, y);
87 return get_residual_l2_core(A, x, y);
92 return get_residual_l2_core(A, x, y);
97 return get_residual_l2_core(A, x, y);
102 return get_residual_l2_core(A, x, y);
107 return get_residual_l2_core(A, x, y);
112 return get_residual_l2_core(A, x, y);
116 return get_residual_l2_core(A, x, y);
120 return get_residual_l2_core(A, x, y);
124 return get_residual_l2_core(A, x, y);
129 return get_residual_l2_core(A, x, y);
134 return get_residual_l2_core(A, x, y);
139 return get_residual_l2_core(A, x, y);
144 return get_residual_l2_core(A, x, y);
149 return get_residual_l2_core(A, x, y);
154 return get_residual_l2_core(A, x, y);
159 return get_residual_l2_core(A, x, y);
163 return get_residual_l2_core(A, x, y);
167 return get_residual_l2_core(A, x, y);
172 return get_residual_l2_core(A, x, y);
177 return get_residual_l2_core(A, x, y);
182 return get_residual_l2_core(A, x, y);
187 return get_residual_l2_core(A, x, y);
192 return get_residual_l2_core(A, x, y);
197 return get_residual_l2_core(A, x, y);
201 return get_residual_l2_core(A, x, y);
205 return get_residual_l2_core(A, x, y);
209 return get_residual_l2_core(A, x, y);
214 return get_residual_l2_core(A, x, y);
219 return get_residual_l2_core(A, x, y);
224 return get_residual_l2_core(A, x, y);
229 return get_residual_l2_core(A, x, y);
234 return get_residual_l2_core(A, x, y);
239 return get_residual_l2_core(A, x, y);
244 return get_residual_l2_core(A, x, y);
249 return get_residual_l2_core(A, x, y);
254 return get_residual_l2_core(A, x, y);
259 return get_residual_l2_core(A, x, y);
264 return get_residual_l2_core(A, x, y);
269 return get_residual_l2_core(A, x, y);
274 return get_residual_l2_core(A, x, y);
279 return get_residual_l2_core(A, x, y);
284 return get_residual_l2_core(A, x, y);
288 return get_residual_l2_core(A, x, y);
293 return get_residual_l2_core(A, x, y);
298 return get_residual_l2_core(A, x, y);
303 return get_residual_l2_core(A, x, y);
308 return get_residual_l2_core(A, x, y);
313 return get_residual_l2_core(A, x, y);
318 return get_residual_l2_core(A, x, y);
323 return get_residual_l2_core(A, x, y);
328 return get_residual_l2_core(A, x, y);