9template <
typename T, T Nmax>
12 std::array<T, Nmax> data{};
21 std::cerr <<
"Array is very small! Please increase its size from settings!\n";
25 for (T i = 0; i <
N; i++)
32 std::cerr <<
"Array is very small! Please increase its size from settings!\n";
45 std::cerr <<
"Array is very small! Please increase its size from settings!\n";
50 inline auto empty() {
return N == 0; }
52 [[nodiscard]]
inline const auto &
operator[](T idx)
const noexcept {
return data[idx]; }
54 [[nodiscard]]
constexpr auto begin() noexcept {
return data.begin(); }
55 [[nodiscard]]
constexpr auto cbegin() const noexcept {
return data.cbegin(); }
57 [[nodiscard]]
constexpr auto end() {
return data.begin() +
N; }
58 [[nodiscard]]
constexpr auto cend() const noexcept {
return data.cbegin() +
N; }
Definition: SmallVector.hpp:11
const auto & operator[](T idx) const noexcept
Definition: SmallVector.hpp:52
T N
number of degradation models to use (length of SEI_ID) #TODO if default should be 1 and array initial...
Definition: SmallVector.hpp:15
constexpr auto cbegin() const noexcept
Definition: SmallVector.hpp:55
void push_back(const T &&elem)
Definition: SmallVector.hpp:29
constexpr auto cend() const noexcept
Definition: SmallVector.hpp:58
constexpr auto end()
Definition: SmallVector.hpp:57
auto & operator[](T idx)
Definition: SmallVector.hpp:40
SmallVector(T N)
Definition: SmallVector.hpp:18
constexpr auto begin() noexcept
Definition: SmallVector.hpp:54
auto empty()
Definition: SmallVector.hpp:50
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27