|
| ndarray (std::array< size_type, N > shape, value_type value=T(), const Allocator &alloc=Allocator()) |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
| ndarray (size_type rows, size_type cols, value_type value=T(), const Allocator &alloc=Allocator()) |
|
template<typename Vector , typename = std::enable_if_t<std::is_class<Vector>::value>> |
| ndarray (std::array< size_type, N > shape, Vector &&x) |
| Constructs an n-dimensional array from a vector.
|
|
template<typename = std::enable_if_t<N == 2>> |
constexpr | ndarray (std::initializer_list< std::initializer_list< T >> list) |
|
template<typename Span , typename = std::enable_if_t<has_shape<Span>::value>> |
constexpr | ndarray (Span &s) |
|
| ndarray (const ndarray &x)=default |
| Copy constructor.
|
|
| ndarray (ndarray &&x)=default |
| Move constructor.
|
|
| ~ndarray ()=default |
| Destructor.
|
|
ndarray & | operator= (const ndarray &x)=default |
| Copy assignment.
|
|
ndarray & | operator= (ndarray &&x)=default |
| Move assignment.
|
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr reference | operator() (size_type i, size_type j) |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr const_reference | operator() (size_type i, size_type j) const |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 3>> |
constexpr reference | operator() (size_type i, size_type j, size_type k) |
| Return a reference to the element at specified location (i, j, k)
|
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 3>> |
constexpr const_reference | operator() (size_type i, size_type j, size_type k) const |
| Return a reference to the element at specified location (i, j, k)
|
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr tcb::span< value_type > | row (size_type i) |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr tcb::span< const value_type > | row (size_type i) const |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 3>> |
constexpr ndspan< value_type, 2 > | row (size_type i) |
| Access a row in the array.
|
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 3>> |
constexpr ndspan< const value_type, 2 > | row (size_type i) const |
| Access a row in the array (const version)
|
|
constexpr value_type * | data () noexcept |
|
constexpr const value_type * | data () const noexcept |
|
constexpr size_type | size () const noexcept |
|
template<int _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr std::array< size_type, 2 > | strides () const noexcept |
| Returns the strides of the array.
|
|
constexpr bool | empty () const noexcept |
|
template<typename T, std::size_t N, class Allocator = std::allocator<T>>
class basix::ndarray< T, N, Allocator >
This class provides a dynamic n-dimensional row-wise array data structure