9 #ifndef CUBBYFLOW_ARRAY3_H 10 #define CUBBYFLOW_ARRAY3_H 49 using Iterator =
typename ContainerType::iterator;
58 explicit Array(
const Size3& size,
const T& initVal = T());
66 explicit Array(
size_t width,
size_t height,
size_t depth,
const T& initVal = T());
95 Array(
const std::initializer_list<std::initializer_list<std::initializer_list<T>>>& list);
104 void Set(
const T& value);
107 void Set(
const Array& other);
136 void Set(
const std::initializer_list<std::initializer_list<std::initializer_list<T>>>& list);
142 void Resize(
const Size3& size,
const T& initVal = T());
146 void Resize(
size_t width,
size_t height,
size_t depth,
const T& initVal = T());
166 const T& At(
size_t i)
const;
172 const T& At(
const Point3UI& pt)
const;
175 T& At(
size_t i,
size_t j,
size_t k);
178 const T& At(
size_t i,
size_t j,
size_t k)
const;
184 size_t Width()
const;
187 size_t Height()
const;
190 size_t Depth()
const;
208 const T*
const data()
const;
217 void Swap(
Array& other);
251 template <
typename Callback>
252 void ForEach(Callback func)
const;
286 template <
typename Callback>
287 void ForEachIndex(Callback func)
const;
309 template <
typename Callback>
310 void ParallelForEach(Callback func);
330 template <
typename Callback>
331 void ParallelForEachIndex(Callback func)
const;
343 T& operator[](
size_t i);
355 const T& operator[](
size_t i)
const;
361 const T& operator()(
const Point3UI& pt)
const;
364 T& operator()(
size_t i,
size_t j,
size_t k);
367 const T& operator()(
size_t i,
size_t j,
size_t k)
const;
370 Array& operator=(
const T& value);
405 Array& operator=(
const std::initializer_list<std::initializer_list<std::initializer_list<T>>>& list);
415 std::vector<T> m_data;
419 template <
typename T>
3-D array accessor class.
Definition: ArrayAccessor3.h:31
3-D read-only array accessor class.
Definition: ArrayAccessor3.h:269
typename ContainerType::iterator Iterator
Definition: Array3.h:49
3-D point class.
Definition: Point3.h:26
Definition: pybind11Utils.h:24
Generic N-dimensional array class interface.
Definition: Array.h:28
3-D array class.
Definition: Array3.h:45
typename ContainerType::const_iterator ConstIterator
Definition: Array3.h:50
std::vector< T > ContainerType
Definition: Array3.h:48