18 #ifndef ABSTRACT_SOLVER_HPP
19 #define ABSTRACT_SOLVER_HPP
23 namespace ezp::detail {
25 using wrapper_type = WT;
28 static constexpr IT ZERO{0}, ONE{1};
30 template<full_container_t CT>
auto to_full(CT&& custom) {
31 if constexpr(has_mem<CT>)
return full_mat<DT, IT>{custom.n_rows, custom.n_cols, custom.mem()};
32 else if constexpr(has_memptr<CT>)
return full_mat<DT, IT>{custom.n_rows, custom.n_cols, custom.memptr()};
33 else if constexpr(has_data_method<CT>)
return full_mat<DT, IT>{custom.n_rows, custom.n_cols, custom.data()};
34 else if constexpr(has_iterator<CT>)
return full_mat<DT, IT>{custom.n_rows, custom.n_cols, &(*custom.begin())};
35 else static_assert(always_false_v<CT>,
"invalid container type");
43 template<full_container_t CT> IT solve(CT&& B) {
return solve(to_full(B)); }
Definition: abstract_solver.hpp:24
Definition: traits.hpp:85