36 |
= T_Var of var |
= T_Var of var |
37 |
| T_Bool |
| T_Bool |
38 |
(* scalars, vectors, matrices, etc. *) |
(* scalars, vectors, matrices, etc. *) |
39 |
|
(* Question: perhaps we want {order : word, dim : dim, ty : raw_ty} instead *) |
40 |
| T_Tensor of {order : dim list, ty : raw_ty} |
| T_Tensor of {order : dim list, ty : raw_ty} |
41 |
(* data sets from NNRD *) |
(* Question: change "data set" to "image"? *) |
42 |
|
(* data sets from NRRD *) |
43 |
| T_Data of { |
| T_Data of { |
44 |
dim : dim, (* 2D or 3D data set *) |
dim : dim, (* 2D or 3D data set *) |
45 |
order : dim list, (* tensor order/dimension info *) |
shape : dim list, (* tensor shape; order is length of list *) |
46 |
repTy : raw_ty (* representation type of elements (raw kind) *) |
repTy : raw_ty (* representation type of elements (raw kind) *) |
47 |
} |
} |
48 |
(* continuous field reconstructed from a data set *) |
(* continuous field reconstructed from a data set *) |
49 |
| T_Field of { |
| T_Field of { |
50 |
|
diff : dim, (* number of levels of differentiation supported *) |
51 |
dim : dim, (* 2D or 3D field *) |
dim : dim, (* 2D or 3D field *) |
52 |
order : dim list, (* tensor order/dimension info *) |
shape : dim list, (* tensor shape; order is length of list *) |
53 |
repTy : raw_ty, (* representation type of elements (raw kind) *) |
repTy : raw_ty, (* representation type of elements (raw kind) *) |
54 |
ty : raw_ty (* type of samples (float kind) *) |
ty : raw_ty (* type of samples (float kind) *) |
55 |
} |
} |
99 |
okDim dim |
okDim dim |
100 |
andalso List.all okDim order |
andalso List.all okDim order |
101 |
andalso okRawTy repTy |
andalso okRawTy repTy |
102 |
andalso okFloatTy repTy |
andalso okFloatTy ty |
103 |
| wellFormed' _ = false |
| wellFormed' _ = false |
104 |
in |
in |
105 |
wellFormed' ty |
wellFormed' ty |