4 #ifndef CPPQEDCORE_UTILS_ARRAYTRAITS_H_INCLUDED
5 #define CPPQEDCORE_UTILS_ARRAYTRAITS_H_INCLUDED
31 bool isStorageContiguous(
const A& a);
35 size_t size(
const A& a);
38 std::vector<size_t> dimensions(
const A& a);
43 const double* data(
const A& a);
51 A
create(
double* y,
const A& a);
54 const A
create(
const double* y,
const A& a);
72 const typename A::element_type&
subscript(
const A& a,
size_t i);
77 typename A::element_type&
subscript( A& a,
size_t i);
81 size_t subscriptLimit(
const A& a);
88 #endif // CPPQEDCORE_UTILS_ARRAYTRAITS_H_INCLUDED
template metafunction providing an identifier string for the multi-array A
Namespace comprising otherwise hard-to-classify generic utilities.
template metafunction for the rank (arity) of the multi-array A
template metafunction returning (by convention, as a member typedef type) the type of elements of the...
A create(double *y, const A &a)
Clone (create a non-owning array of data y of the same memory layout as a)
const A::element_type & subscript(const A &a, size_t i)
subscription of a (which might be a multi-array) with a single integer