|
constexpr | ndspan (T *data, std::array< size_type, N > shape) |
|
template<typename Array , typename = std::enable_if_t<has_shape<Array>::value>> |
constexpr | ndspan (Array &x) |
| Construct an n-dimensional span from an n-dimensional array.
|
|
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 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 () const noexcept |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr size_type | size () const noexcept |
|
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>> |
constexpr std::array< size_type, 2 > | strides () const noexcept |
| Returns the strides of the span.
|
|
template<typename T, std::size_t N = 2>
class basix::ndspan< T, N >
This class provides a view into an n-dimensional row-wise array of data.
template<typename T , std::size_t N = 2>
template<std::size_t _N = N, typename = std::enable_if_t<_N == 2>>
constexpr reference basix::ndspan< T, N >::operator() |
( |
size_type |
i, |
|
|
size_type |
j |
|
) |
| const |
|
inlineconstexpr |
Return a reference to the element at specified location (i, j) (const version)
- Parameters
-
[in] | i | Row index |
[in] | j | Column index |
- Returns
- Reference to the (i, j) item
- Note
- No bounds checking is performed