NDArray¶
-
template<typename T, int64_t Ndim = 2>
class NDArray : public aare::ArrayExpr<NDArray<T, 2>, 2>¶ -
Public Functions
-
inline explicit NDArray(std::array<int64_t, Ndim> shape)¶
Construct a new NDArray object with a given shape.
Note
The data is uninitialized.
- Parameters:
shape – shape of the new NDArray
-
inline NDArray(std::array<int64_t, Ndim> shape, T value)¶
Construct a new NDArray object with a shape and value.
- Parameters:
shape – shape of the new array
value – value to initialize the array with
-
inline explicit NDArray(const NDView<T, Ndim> v)¶
Construct a new NDArray object from a NDView.
Note
The data is copied from the view to the NDArray.
- Parameters:
v – view of data to initialize the NDArray with
-
inline ~NDArray()¶
-
inline auto begin()¶
-
inline auto end()¶
-
inline void sqrt()¶
-
template<typename ...Ix>
inline std::enable_if_t<sizeof...(Ix) == Ndim, T&> operator()(Ix... index) const¶
-
inline std::byte *buffer()¶
-
inline size_t size() const¶
-
inline size_t total_bytes() const¶
-
inline int64_t shape(int64_t i) const noexcept¶
-
inline size_t bitdepth() const noexcept¶
-
void Print()¶
-
void Print_all()¶
-
void Print_some()¶
-
inline void reset()¶
-
inline explicit NDArray(std::array<int64_t, Ndim> shape)¶