Multidimensional array with runtime rank and shape.
More...
#include <multi_array.hpp>
|
|
| multi_array ()=default |
| | Creates an empty array.
|
| |
| | multi_array (const std::vector< std::size_t > &shape_, const T &value_=T()) |
| | Creates an array with a given shape. More...
|
| |
| template<typename... Indices, typename Enabler = typename std::enable_if< detail::all_integral<Indices...>::value>::type> |
| const T & | operator() (Indices...indices) const |
| | Accesses a specified element. More...
|
| |
| template<typename... Indices, typename Enabler = typename std::enable_if< detail::all_integral<Indices...>::value>::type> |
| T & | operator() (Indices...indices) |
| | Accesses a specified element. More...
|
| |
| template<typename... Args, typename Enabler = typename std::enable_if< !detail::all_integral<Args...>::value>::type> |
| echelon::hdf5::array_slice< T > | operator() (Args...args) |
| | Slice the array. More...
|
| |
| const T * | data () const |
| | Direct access to the underlying array. More...
|
| |
| T * | data () |
| | Direct access to the underlying array. More...
|
| |
| std::vector< T >::iterator | begin () |
| | Returns an iterator, which points to the first element of the flattened array. More...
|
| |
| std::vector< T >::iterator | end () |
| | Returns an iterator, which points to the last element of the flattened array. More...
|
| |
| std::vector< T >::const_iterator | begin () const |
| | Returns an iterator, which points to the first element of the flattened array. More...
|
| |
| std::vector< T >::const_iterator | end () const |
| | Returns an iterator, which points to the last element of the flattened array. More...
|
| |
|
const std::vector< std::size_t > & | shape () const |
| | The shape of the array.
|
| |
| void | reshape (const std::vector< std::size_t > &new_shape) |
| | Reshapes the array. More...
|
| |
template<typename T>
class echelon::multi_array< T >
Multidimensional array with runtime rank and shape.
- Template Parameters
-
Creates an array with a given shape.
- Parameters
-
| shape_ | the shape of the array |
| value_ | value, which is used to initialize every element. By default this is the default constructed value. |
Returns an iterator, which points to the first element of the flattened array.
- Note
- The order, in which the elements appear in the flattened sequence, is not specified.
Returns an iterator, which points to the first element of the flattened array.
- Note
- The order, in which the elements appear in the flattened sequence, is not specified.
Direct access to the underlying array.
- Returns
- a pointer to the underlying array.
Direct access to the underlying array.
- Returns
- a pointer to the underlying array.
Returns an iterator, which points to the last element of the flattened array.
- Note
- The order, in which the elements appear in the flattened sequence, is not specified.
Returns an iterator, which points to the last element of the flattened array.
- Note
- The order, in which the elements appear in the flattened sequence, is not specified.
template<typename T >
template<typename... Indices, typename Enabler = typename std::enable_if< detail::all_integral<Indices...>::value>::type>
template<typename T >
template<typename... Indices, typename Enabler = typename std::enable_if< detail::all_integral<Indices...>::value>::type>
template<typename T >
template<typename... Args, typename Enabler = typename std::enable_if< !detail::all_integral<Args...>::value>::type>
Slice the array.
- Template Parameters
-
| Args | types of the index range specifiers |
- Parameters
-
| args | index range specifiers |
- Returns
- the specified slice.
Reshapes the array.
- Parameters
-
| new_shape | new shape of the array |
The documentation for this class was generated from the following file: