1Bigarray.Array3(3) OCaml library Bigarray.Array3(3)
2
3
4
6 Bigarray.Array3 - Three-dimensional arrays.
7
9 Module Bigarray.Array3
10
12 Module Array3
13 : sig end
14
15
16 Three-dimensional arrays. The Array3 structure provides operations sim‐
17 ilar to those of Bigarray.Genarray , but specialized to the case of
18 three-dimensional arrays.
19
20
21
22
23
24
25 type ('a, 'b, 'c) t
26
27
28 The type of three-dimensional big arrays whose elements have Caml type
29 'a , representation kind 'b , and memory layout 'c .
30
31
32
33
34 val create : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> int -> int
35 -> int -> ('a, 'b, 'c) t
36
37
38 Array3.create kind layout dim1 dim2 dim3 returns a new bigarray of
39 three dimension, whose size is dim1 in the first dimension, dim2 in the
40 second dimension, and dim3 in the third. kind and layout determine the
41 array element kind and the array layout as described for Bigar‐
42 ray.Genarray.create .
43
44
45
46
47 val dim1 : ('a, 'b, 'c) t -> int
48
49 Return the first dimension of the given three-dimensional big array.
50
51
52
53
54 val dim2 : ('a, 'b, 'c) t -> int
55
56 Return the second dimension of the given three-dimensional big array.
57
58
59
60
61 val dim3 : ('a, 'b, 'c) t -> int
62
63 Return the third dimension of the given three-dimensional big array.
64
65
66
67
68 val kind : ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kind
69
70 Return the kind of the given big array.
71
72
73
74
75 val layout : ('a, 'b, 'c) t -> 'c Bigarray.layout
76
77 Return the layout of the given big array.
78
79
80
81
82 val get : ('a, 'b, 'c) t -> int -> int -> int -> 'a
83
84
85 Array3.get a x y z , also written a.{x,y,z} , returns the element of a
86 at coordinates ( x , y , z ). x , y and z must be within the bounds of
87 a , as described for Bigarray.Genarray.get ; otherwise, Invalid_arg is
88 raised.
89
90
91
92
93 val set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit
94
95
96 Array3.set a x y v , or alternatively a.{x,y,z} <- v , stores the value
97 v at coordinates ( x , y , z ) in a . x , y and z must be within the
98 bounds of a , as described for Bigarray.Genarray.set ; otherwise,
99 Invalid_arg is raised.
100
101
102
103
104 val sub_left : ('a, 'b, Bigarray.c_layout) t -> int -> int -> ('a, 'b,
105 Bigarray.c_layout) t
106
107 Extract a three-dimensional sub-array of the given three-dimensional
108 big array by restricting the first dimension. See Bigarray.Genar‐
109 ray.sub_left for more details. Array3.sub_left applies only to arrays
110 with C layout.
111
112
113
114
115 val sub_right : ('a, 'b, Bigarray.fortran_layout) t -> int -> int ->
116 ('a, 'b, Bigarray.fortran_layout) t
117
118 Extract a three-dimensional sub-array of the given three-dimensional
119 big array by restricting the second dimension. See Bigarray.Genar‐
120 ray.sub_right for more details. Array3.sub_right applies only to
121 arrays with Fortran layout.
122
123
124
125
126 val slice_left_1 : ('a, 'b, Bigarray.c_layout) t -> int -> int -> ('a,
127 'b, Bigarray.c_layout) Bigarray.Array1.t
128
129 Extract a one-dimensional slice of the given three-dimensional big
130 array by fixing the first two coordinates. The integer parameters are
131 the coordinates of the slice to extract. See Bigarray.Genar‐
132 ray.slice_left for more details. Array3.slice_left_1 applies only to
133 arrays with C layout.
134
135
136
137
138 val slice_right_1 : ('a, 'b, Bigarray.fortran_layout) t -> int -> int
139 -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.t
140
141 Extract a one-dimensional slice of the given three-dimensional big
142 array by fixing the last two coordinates. The integer parameters are
143 the coordinates of the slice to extract. See Bigarray.Genar‐
144 ray.slice_right for more details. Array3.slice_right_1 applies only to
145 arrays with Fortran layout.
146
147
148
149
150 val slice_left_2 : ('a, 'b, Bigarray.c_layout) t -> int -> ('a, 'b,
151 Bigarray.c_layout) Bigarray.Array2.t
152
153 Extract a two-dimensional slice of the given three-dimensional big
154 array by fixing the first coordinate. The integer parameter is the
155 first coordinate of the slice to extract. See Bigarray.Genar‐
156 ray.slice_left for more details. Array3.slice_left_2 applies only to
157 arrays with C layout.
158
159
160
161
162 val slice_right_2 : ('a, 'b, Bigarray.fortran_layout) t -> int -> ('a,
163 'b, Bigarray.fortran_layout) Bigarray.Array2.t
164
165 Extract a two-dimensional slice of the given three-dimensional big
166 array by fixing the last coordinate. The integer parameter is the
167 coordinate of the slice to extract. See Bigarray.Genarray.slice_right
168 for more details. Array3.slice_right_2 applies only to arrays with
169 Fortran layout.
170
171
172
173
174 val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
175
176 Copy the first big array to the second big array. See Bigarray.Genar‐
177 ray.blit for more details.
178
179
180
181
182 val fill : ('a, 'b, 'c) t -> 'a -> unit
183
184 Fill the given big array with the given value. See Bigarray.Genar‐
185 ray.fill for more details.
186
187
188
189
190 val of_array : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> 'a array
191 array array -> ('a, 'b, 'c) t
192
193 Build a three-dimensional big array initialized from the given array of
194 arrays of arrays.
195
196
197
198
199 val map_file : Unix.file_descr -> ('a, 'b) Bigarray.kind -> 'c Bigar‐
200 ray.layout -> bool -> int -> int -> int -> ('a, 'b, 'c) t
201
202 Memory mapping of a file as a three-dimensional big array. See Bigar‐
203 ray.Genarray.map_file for more details.
204
205
206
207
208
209
210OCamldoc 2007-05-24 Bigarray.Array3(3)