Debian Codegraph @

doc/examples/outer.cpp

raw
1 #include <blitz/array.h>
2
3 using namespace blitz;
4
5 int main()
6 {
7 Array<float,1> x(4), y(4);
8 Array<float,2> A(4,4);
9
10 x = 1, 2, 3, 4;
11 y = 1, 0, 0, 1;
12
13 firstIndex i;
14 secondIndex j;
15
16 A = x(i) * y(j);
17
18 cout << A << endl;
19
20 return 0;
21 }
22