SCM Repository
[diderot] Annotation of /branches/pure-cfg/test/ty-test.diderot
Annotation of /branches/pure-cfg/test/ty-test.diderot
Parent Directory
|
Revision Log
Revision 477 -
(view)
(download)
1 : |
jhr |
472 |
// ty-test.diderot
|
2 : |
|
|
//
|
3 : |
|
|
// This file tests various typechecking rules
|
4 : |
|
|
|
5 : |
jhr |
474 |
tensor[2,3] x = [[0.0, 0.1, 0.2], [1.0, 1.1, 2.1]];
|
6 : |
|
|
tensor[3] y = x[1,:];
|
7 : |
|
|
tensor[2] z = x[:,0];
|
8 : |
jhr |
475 |
tensor[3,2] m = [x[:,0], x[:,1], x[:,2]];
|
9 : |
jhr |
472 |
|
10 : |
|
|
image(3)[2] img1 = load("img1.nrrd");
|
11 : |
|
|
field#2(3)[2] F = img1 (*) bspln3;
|
12 : |
|
|
field#1(3)[2,3] dF = D F;
|
13 : |
jhr |
474 |
|
14 : |
jhr |
475 |
tensor[3] w = (dF @ y)[0,:];
|
15 : |
jhr |
474 |
|