3 #include "utilities/tuple_like.h" 11 template <
typename T,
size_t... Ix>
12 constexpr
auto make_next_array(T&& a,
double rci, std::index_sequence<Ix...>) {
13 constexpr
auto size =
sizeof...(Ix);
14 return std::array<double, size>{
15 {(util::tuple_like_getter<Ix>(a) -
16 util::tuple_like_getter<size - Ix>(a) * rci) /
21 constexpr
auto make_next_array(T&& a,
double rci) {
22 constexpr
auto size = util::tuple_like_size_v<util::decay_const_ref_t<T>>;
23 return make_next_array(
24 std::forward<T>(a), rci, std::make_index_sequence<size - 1>{});
31 util::tuple_like_size_v<util::decay_const_ref_t<T>> == 1,
33 constexpr
auto is_stable(T&&) {
41 util::tuple_like_size_v<util::decay_const_ref_t<T>> != 1,
43 constexpr
auto is_stable(T&& a) {
44 constexpr
auto size = util::tuple_like_size_v<util::decay_const_ref_t<T>>;
45 const auto rci = util::tuple_like_getter<size - 1>(a);
46 if (1 <= std::abs(rci)) {
49 return is_stable(detail::make_next_array(std::forward<T>(a), rci));
Definition: capsule_base.h:9