#include <jem/std/complex.h>
#include <jem/base/System.h>
#include <jem/base/Array.h>
#include <jem/util/Timer.h>
int run ()
{
z = zadd( 0.8 +
imag(z), -9 );
print ( out,
"array a : ", a, endl, endl );
b = a[slice(0,10)];
print ( out,
"array b : ", b, endl, endl );
b = a[slice(0,END,2)];
print ( out,
"array b : ", b, endl, endl );
c.
ref ( a[slice(10,20)]);
c[0] = 55;
print ( out,
"array a : ", a, endl, endl );
print ( out,
"array c : ", c, endl, endl );
for ( idx_t i = 0; i < b.
size(); i++ )
{
b[i] = (int) pow ( 2.0, (double) (i + 2) );
}
for ( idx_t i = 0; i < h.
size(); i++ )
{
h[i] = 0.5 * M_PI * (double) i;
}
e = false;
d =
where( a[slice(0,5)] % 2 == 0, e[slice(0,5)],
false );
e = ! d;
print ( out,
"array d : ", d, endl, endl );
print ( out,
"array e : ", e, endl, endl );
f = brshift ( b, 3 );
print ( out,
"array b : ", b, endl, endl );
print ( out,
"array f : ", f, endl, endl );
g = f[slice(1,END,2)] + 0.1;
q =
sqrt( g ) + 2 * sin( h );
print ( out,
"array g : ", g, endl, endl );
print ( out,
"array h : ", h, endl, endl );
print ( out,
"array q : ", q, endl, endl );
print ( out,
"array q : ", q , endl, endl );
print ( out,
"min of q : ",
min( q ), endl, endl );
print ( out,
"max of q : ",
max( q ), endl, endl );
print ( out,
"sum of q : ",
sum( q ), endl, endl );
print ( out,
"array f2 : ", endl, f2, endl, endl );
print ( out,
"array f3 : ", endl, f3, endl, endl );
print ( out,
"array f4 : ", endl, f4, endl, endl );
print ( out,
"array f5 : ", endl, f5, endl, endl );
print ( out,
"array f6 : ", endl, f6, endl, endl);
return 0;
}
int main ()
{
}