#include <nda/array_adapter.hpp>
template<int R, typename F>
class nda::array_adapter< R, F >
Adapter that consists of a shape and a callable object, which takes R
integers as arguments (just like an nda::basic_array or nda::basic_array_view).
- Template Parameters
-
R | Rank of the adapter. |
F | Callable type. |
Definition at line 45 of file array_adapter.hpp.
|
template<typename Int > |
| array_adapter (std::array< Int, R > const &shape, F f) |
| Construct a new array adapter object.
|
|
template<typename... Ints> |
auto | operator() (long i0, Ints... is) const |
| Function call operator simply forwards the arguments to the callable object.
|
|
auto const & | shape () const |
| Get shape of the adapter.
|
|
long | size () const |
| Get the total size of the adapter.
|
|
◆ array_adapter()
template<int R, typename F >
template<typename Int >
Construct a new array adapter object.
- Template Parameters
-
- Parameters
-
shape | Shape of the adapater. |
f | Callable object. |
Definition at line 63 of file array_adapter.hpp.
◆ operator()()
template<int R, typename F >
template<typename... Ints>
Function call operator simply forwards the arguments to the callable object.
- Template Parameters
-
Ints | Integer types (convertible to long). |
- Parameters
-
i0 | First argument. |
is | Rest of the arguments. |
Definition at line 85 of file array_adapter.hpp.
◆ shape()
template<int R, typename F >
Get shape of the adapter.
- Returns
std::array<long, R>
object specifying the shape of the adapter.
Definition at line 69 of file array_adapter.hpp.
◆ size()
template<int R, typename F >
Get the total size of the adapter.
- Returns
- Number of elements in the adapter.
Definition at line 75 of file array_adapter.hpp.
The documentation for this class was generated from the following file: