90 section(
"Test constructors",
'=');
104 section(
"Test assignment",
'=');
116 section(
"Test access operators",
'=');
120 for(
int i=A.f(0); i<=A.l(0); i++)
122 for(
int j=A.f(1); j<=A.l(1); j++)
124 for(
int k=A.f(2); k<=A.l(2); k++)
126 for(
int l=A.f(3); l<=A.l(3); l++)
128 A(i,j,k,l)=(i-A.f(0)+1)+(j-A.f(1)+1)*10
129 +(k-A.f(2)+1)*100+(l-A.f(3)+1)*1000;
138 DUMP( A.representation() );
164 CODE( H=A.representation(); );
168 CODE( H2=B.representation(); );
172 #warning compiling supposedly illegal code 177 #warning compiling supposedly illegal code 183 #warning compiling supposedly illegal code 188 #warning compiling supposedly illegal code 193 #warning compiling supposedly illegal code 198 #warning compiling supposedly illegal code 203 section(
"read access to ConstArray and const Array");
209 CODE( cout << A(2,2) <<
", " << B(2,2) <<
", " << C(2,2) << endl );
212 #warning compiling supposedly illegal code 217 section(
"test copyout function");
221 for(
int i=A.f(0); i<=A.l(0); i++)
223 for(
int j=A.f(1); j<=A.l(1); j++)
225 A(i,j)=(i-A.f(0)+1)+(j-A.f(1)+1)*10;
Array< T > copyout() const
create an identical copy (deep copy) of this array
void section(const char *s, const char l='-')
print headline
#define DUMP(A)
Dump any object through its dump function.
#define AFF_ARRAYTEST_CC_VERSION
aff::util::Subarray< C > subarray(const C &c)
Wrapper function to select correct type.
A template class to share heap memory for different array projections.
#define CODE(C)
Dump code and execute (works like echo)
void dump_array(const ConstArray< T > &array, const Tdim &i=(Strided::Mmax_dimen-1), std::ostream &os=std::cout)
Dump array values.
This is the base class for const elements.
Full multi-dimensional array functionality.This is the full array class template. It adds no addition...
Shaper class for Fortran layout.
Array base classThis is a multidimensional (array) container that uses a strided memory layout (Fortr...