1Bigarray.Array3(3)                 OCamldoc                 Bigarray.Array3(3)
2
3
4

NAME

6       Bigarray.Array3 - Three-dimensional arrays.
7

Module

9       Module   Bigarray.Array3
10

Documentation

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       type ('a, 'b, 'c) t
25
26
27       The type of three-dimensional big arrays whose elements have OCaml type
28       'a , representation kind 'b , and memory layout 'c .
29
30
31
32       val create : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> int -> int
33       -> int -> ('a, 'b, 'c) t
34
35
36       Array3.create  kind  layout  dim1  dim2  dim3 returns a new bigarray of
37       three dimension, whose size is dim1 in the first dimension, dim2 in the
38       second dimension, and dim3 in the third.  kind and layout determine the
39       array element kind  and  the  array  layout  as  described  for  Bigar‐
40       ray.Genarray.create .
41
42
43
44       val dim1 : ('a, 'b, 'c) t -> int
45
46       Return the first dimension of the given three-dimensional big array.
47
48
49
50       val dim2 : ('a, 'b, 'c) t -> int
51
52       Return the second dimension of the given three-dimensional big array.
53
54
55
56       val dim3 : ('a, 'b, 'c) t -> int
57
58       Return the third dimension of the given three-dimensional big array.
59
60
61
62       val kind : ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kind
63
64       Return the kind of the given big array.
65
66
67
68       val layout : ('a, 'b, 'c) t -> 'c Bigarray.layout
69
70       Return the layout of the given big array.
71
72
73
74       val size_in_bytes : ('a, 'b, 'c) t -> int
75
76
77       size_in_bytes  a  is  the  number  of  elements in a multiplied by a 's
78       Bigarray.kind_size_in_bytes .
79
80
81       Since 4.03.0
82
83
84
85       val get : ('a, 'b, 'c) t -> int -> int -> int -> 'a
86
87
88       Array3.get a x y z , also written a.{x,y,z} , returns the element of  a
89       at coordinates ( x , y , z ).  x , y and z must be within the bounds of
90       a , as described for Bigarray.Genarray.get ;  otherwise,  Invalid_argu‐
91       ment is raised.
92
93
94
95       val set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit
96
97
98       Array3.set a x y v , or alternatively a.{x,y,z} <- v , stores the value
99       v at coordinates ( x , y , z ) in a .  x , y and z must be  within  the
100       bounds  of  a  ,  as  described  for Bigarray.Genarray.set ; otherwise,
101       Invalid_argument is raised.
102
103
104
105       val sub_left : ('a, 'b, Bigarray.c_layout) t -> int -> int -> ('a,  'b,
106       Bigarray.c_layout) t
107
108       Extract  a  three-dimensional  sub-array of the given three-dimensional
109       big array by restricting  the  first  dimension.   See  Bigarray.Genar‐
110       ray.sub_left  for more details.  Array3.sub_left applies only to arrays
111       with C layout.
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       val slice_left_1 : ('a, 'b, Bigarray.c_layout) t -> int -> int ->  ('a,
126       'b, Bigarray.c_layout) Bigarray.Array1.t
127
128       Extract  a  one-dimensional  slice  of  the given three-dimensional big
129       array by fixing the first two coordinates.  The integer parameters  are
130       the   coordinates   of  the  slice  to  extract.   See  Bigarray.Genar‐
131       ray.slice_left for more details.  Array3.slice_left_1 applies  only  to
132       arrays with C layout.
133
134
135
136       val  slice_right_1  : ('a, 'b, Bigarray.fortran_layout) t -> int -> int
137       -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.t
138
139       Extract a one-dimensional slice  of  the  given  three-dimensional  big
140       array  by  fixing the last two coordinates.  The integer parameters are
141       the  coordinates  of  the  slice  to  extract.    See   Bigarray.Genar‐
142       ray.slice_right for more details.  Array3.slice_right_1 applies only to
143       arrays with Fortran layout.
144
145
146
147       val slice_left_2 : ('a, 'b, Bigarray.c_layout) t ->  int  ->  ('a,  'b,
148       Bigarray.c_layout) Bigarray.Array2.t
149
150       Extract  a   two-dimensional  slice  of the given three-dimensional big
151       array by fixing the first coordinate.  The  integer  parameter  is  the
152       first   coordinate  of  the  slice  to  extract.   See  Bigarray.Genar‐
153       ray.slice_left for more details.  Array3.slice_left_2 applies  only  to
154       arrays with C layout.
155
156
157
158       val  slice_right_2 : ('a, 'b, Bigarray.fortran_layout) t -> int -> ('a,
159       'b, Bigarray.fortran_layout) Bigarray.Array2.t
160
161       Extract a two-dimensional slice  of  the  given  three-dimensional  big
162       array  by  fixing  the  last  coordinate.  The integer parameter is the
163       coordinate of the slice to extract.  See  Bigarray.Genarray.slice_right
164       for  more  details.   Array3.slice_right_2  applies only to arrays with
165       Fortran layout.
166
167
168
169       val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
170
171       Copy the first big array to the second big array.  See  Bigarray.Genar‐
172       ray.blit for more details.
173
174
175
176       val fill : ('a, 'b, 'c) t -> 'a -> unit
177
178       Fill  the  given  big  array with the given value.  See Bigarray.Genar‐
179       ray.fill for more details.
180
181
182
183       val of_array : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> 'a array
184       array array -> ('a, 'b, 'c) t
185
186       Build a three-dimensional big array initialized from the given array of
187       arrays of arrays.
188
189
190
191       val map_file : Unix.file_descr -> ?pos:int64 -> ('a, 'b)  Bigarray.kind
192       -> 'c Bigarray.layout -> bool -> int -> int -> int -> ('a, 'b, 'c) t
193
194       Memory  mapping of a file as a three-dimensional big array.  See Bigar‐
195       ray.Genarray.map_file for more details.
196
197
198
199       val unsafe_get : ('a, 'b, 'c) t -> int -> int -> int -> 'a
200
201       Like Bigarray.Array3.get , but bounds checking is not always performed.
202
203
204
205       val unsafe_set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit
206
207       Like Bigarray.Array3.set , but bounds checking is not always performed.
208
209
210
211
212
2132018-04-14                          source:                 Bigarray.Array3(3)
Impressum