48template <
typename T,
size_t N>
53 VectorN(std::array<T, N>& arr) :
std::array<T, N>(arr) {}
55 VectorN(
const std::array<T, N>& arr) { std::copy(arr.begin(), arr.end(), this->begin()); }
59 for (
size_t i = 0; i < N; ++i) {
60 result[i] = (*this)[i] + other[i];
68 for (
size_t i = 0; i < N; ++i) {
69 result[i] = (*this)[i] - other[i];
76 for (
size_t i = 0; i < N; ++i) {
77 result[i] = (*this)[i] - other[i];
84 for (
size_t i = 0; i < N; ++i) {
85 result[i] = -(*this)[i];
92 for (
size_t i = 0; i < N; ++i) {
93 (*this)[i] += other[i];
107inline std::string
zeroPad(
size_t value,
size_t width) {
108 std::ostringstream oss;
109 oss << std::setw(width) << std::setfill(
'0') << value;
116inline size_t roundUp(
const size_t& number,
const size_t& multiple) {
return (number + multiple - 1) & -multiple; }
VectorN(const std::array< T, N > &arr)
Definition utils.hpp:55
VectorN(T x, T y, T z)
Definition utils.hpp:52
VectorN< double, N > operator-(const VectorN< double, N > &other) const
Definition utils.hpp:74
VectorN(std::array< T, N > &&arr)
Definition utils.hpp:54
VectorN< T, N > operator+(const VectorN< U, N > &other) const
Definition utils.hpp:57
VectorN(std::array< T, N > &arr)
Definition utils.hpp:53
VectorN< T, N > & operator/=(const U &val)
Definition utils.hpp:99
VectorN< T, N > & operator+=(const VectorN< U, N > &other)
Definition utils.hpp:91
VectorN< T, N > operator-() const
Definition utils.hpp:82
VectorN< T, N > operator-(const VectorN< U, N > &other) const
Definition utils.hpp:66
VectorN()
Definition utils.hpp:51
Definition jobManagement.hpp:71
Definition jobManagement.hpp:49
std::string zeroPad(size_t value, size_t width)
Definition utils.hpp:107
size_t roundUp(const size_t &number, const size_t &multiple)
Definition utils.hpp:116
int y
Definition slicingComputation.cpp:172
int x
Definition slicingComputation.cpp:172