18template <
typename T,
size_t N>
19auto arrSum(
const std::array<T, N> &a1,
const std::array<T, N> &a2,
double b1,
double b2)
23 for (
size_t i = 0; i < N; i++)
24 c[i] = b1 * a1[i] + b2 * a2[i];
29template <
typename T,
size_t N>
30auto operator+=(std::array<T, N> &c,
const std::array<T, N> &b)
32 for (
size_t i = 0; i < N; i++)
38template <
typename T,
size_t N>
39auto operator+(
const std::array<T, N> &a,
const std::array<T, N> &b)
46template <
typename T,
size_t N>
47auto operator-=(std::array<T, N> &c,
const std::array<T, N> &b)
49 for (
size_t i = 0; i < N; i++)
55template <
typename T,
size_t N>
56auto operator-(
const std::array<T, N> &a,
const std::array<T, N> &b)
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27
auto arrSum(const std::array< T, N > &a1, const std::array< T, N > &a2, double b1, double b2)
Definition: array_util.hpp:19
auto operator+=(std::array< T, N > &c, const std::array< T, N > &b)
Definition: array_util.hpp:30
auto operator+(const std::array< T, N > &a, const std::array< T, N > &b)
Definition: array_util.hpp:39
auto operator-=(std::array< T, N > &c, const std::array< T, N > &b)
Definition: array_util.hpp:47
auto operator-(const std::array< T, N > &a, const std::array< T, N > &b)
Definition: array_util.hpp:56