18 std::vector<std::span<double>> state_span;
19 std::vector<double> states;
37 void add(std::span<T> x)
39 state_span.emplace_back(x);
40 states.insert(states.end(), x.begin(), x.end());
43 [[nodiscard]]
constexpr auto begin() noexcept {
return states.begin(); }
44 [[nodiscard]]
constexpr auto end() noexcept {
return states.end(); }
50 for (
auto spn : state_span) {
51 std::copy_n(states.begin() + i, spn.size(), spn.begin());
Definition: StateStorage.hpp:17
constexpr void clear() noexcept
Definition: StateStorage.hpp:23
void add(std::span< T > x)
Definition: StateStorage.hpp:37
size_t index
Definition: StateStorage.hpp:22
constexpr auto end() noexcept
Definition: StateStorage.hpp:44
void add(T &x)
Definition: StateStorage.hpp:31
void restore()
Definition: StateStorage.hpp:46
constexpr auto begin() noexcept
Definition: StateStorage.hpp:43
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27