TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
nda::Array Concept Reference

#include <nda/concepts.hpp>

Detailed Description

Check if a given type satisfies the array concept.

An array is a multi-dimensional container of elements. It is characterized by a certain size (number of elements), rank (number of dimensions) and shape (extent of each dimension). Furthermore, it provides access to its elements by overloading the function call operator.

Examples of types satisfying this concept are e.g. nda::basic_array or nda::basic_array_view.

Note
std::array does not satisfy this concept, as it does not have a shape or provides access via the function call operator.
Template Parameters
AType to check.

Definition at line 230 of file concepts.hpp.

Concept definition

template<typename A>
concept nda::Array = requires(A const &a) {
{ a.shape() } -> StdArrayOfLong;
{ a.size() } -> std::same_as<long>;
requires CallableWithLongs<A, get_rank<A>>;
}
Check if a given type satisfies the array concept.
Definition concepts.hpp:230
Check if a given type is of type std::array<long, R> for some arbitrary R.
Definition concepts.hpp:112