.TH "Bigarray.Array3" 3o source: 2019-01-25 OCamldoc "OCaml library" .SH NAME Bigarray.Array3 \- Three-dimensional arrays. .SH Module Module Bigarray.Array3 .SH Documentation .sp Module .BI "Array3" : .B sig end .sp Three\-dimensional arrays\&. The .B Array3 structure provides operations similar to those of .B Bigarray\&.Genarray , but specialized to the case of three\-dimensional arrays\&. .sp .sp .sp .I type .B ('a, 'b, 'c) .I t .sp The type of three\-dimensional big arrays whose elements have OCaml type .B \&'a , representation kind .B \&'b , and memory layout .B \&'c \&. .sp .I val create : .B ('a, 'b) Bigarray.kind -> .B 'c Bigarray.layout -> int -> int -> int -> ('a, 'b, 'c) t .sp .B Array3\&.create kind layout dim1 dim2 dim3 returns a new bigarray of three dimension, whose size is .B dim1 in the first dimension, .B dim2 in the second dimension, and .B dim3 in the third\&. .B kind and .B layout determine the array element kind and the array layout as described for .B Bigarray\&.Genarray\&.create \&. .sp .I val dim1 : .B ('a, 'b, 'c) t -> int .sp Return the first dimension of the given three\-dimensional big array\&. .sp .I val dim2 : .B ('a, 'b, 'c) t -> int .sp Return the second dimension of the given three\-dimensional big array\&. .sp .I val dim3 : .B ('a, 'b, 'c) t -> int .sp Return the third dimension of the given three\-dimensional big array\&. .sp .I val kind : .B ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kind .sp Return the kind of the given big array\&. .sp .I val layout : .B ('a, 'b, 'c) t -> 'c Bigarray.layout .sp Return the layout of the given big array\&. .sp .I val size_in_bytes : .B ('a, 'b, 'c) t -> int .sp .B size_in_bytes a is the number of elements in .B a multiplied by .B a \&'s .B Bigarray\&.kind_size_in_bytes \&. .sp .B "Since" 4.03.0 .sp .I val get : .B ('a, 'b, 'c) t -> int -> int -> int -> 'a .sp .B Array3\&.get a x y z , also written .B a\&.{x,y,z} , returns the element of .B a at coordinates ( .B x , .B y , .B z )\&. .B x , .B y and .B z must be within the bounds of .B a , as described for .B Bigarray\&.Genarray\&.get ; otherwise, .B Invalid_argument is raised\&. .sp .I val set : .B ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit .sp .B Array3\&.set a x y v , or alternatively .B a\&.{x,y,z} <\- v , stores the value .B v at coordinates ( .B x , .B y , .B z ) in .B a \&. .B x , .B y and .B z must be within the bounds of .B a , as described for .B Bigarray\&.Genarray\&.set ; otherwise, .B Invalid_argument is raised\&. .sp .I val sub_left : .B ('a, 'b, Bigarray.c_layout) t -> .B int -> int -> ('a, 'b, Bigarray.c_layout) t .sp Extract a three\-dimensional sub\-array of the given three\-dimensional big array by restricting the first dimension\&. See .B Bigarray\&.Genarray\&.sub_left for more details\&. .B Array3\&.sub_left applies only to arrays with C layout\&. .sp .I val sub_right : .B ('a, 'b, Bigarray.fortran_layout) t -> .B int -> int -> ('a, 'b, Bigarray.fortran_layout) t .sp Extract a three\-dimensional sub\-array of the given three\-dimensional big array by restricting the second dimension\&. See .B Bigarray\&.Genarray\&.sub_right for more details\&. .B Array3\&.sub_right applies only to arrays with Fortran layout\&. .sp .I val slice_left_1 : .B ('a, 'b, Bigarray.c_layout) t -> .B int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t .sp Extract a one\-dimensional slice of the given three\-dimensional big array by fixing the first two coordinates\&. The integer parameters are the coordinates of the slice to extract\&. See .B Bigarray\&.Genarray\&.slice_left for more details\&. .B Array3\&.slice_left_1 applies only to arrays with C layout\&. .sp .I val slice_right_1 : .B ('a, 'b, Bigarray.fortran_layout) t -> .B int -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.t .sp Extract a one\-dimensional slice of the given three\-dimensional big array by fixing the last two coordinates\&. The integer parameters are the coordinates of the slice to extract\&. See .B Bigarray\&.Genarray\&.slice_right for more details\&. .B Array3\&.slice_right_1 applies only to arrays with Fortran layout\&. .sp .I val slice_left_2 : .B ('a, 'b, Bigarray.c_layout) t -> .B int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array2.t .sp Extract a two\-dimensional slice of the given three\-dimensional big array by fixing the first coordinate\&. The integer parameter is the first coordinate of the slice to extract\&. See .B Bigarray\&.Genarray\&.slice_left for more details\&. .B Array3\&.slice_left_2 applies only to arrays with C layout\&. .sp .I val slice_right_2 : .B ('a, 'b, Bigarray.fortran_layout) t -> .B int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array2.t .sp Extract a two\-dimensional slice of the given three\-dimensional big array by fixing the last coordinate\&. The integer parameter is the coordinate of the slice to extract\&. See .B Bigarray\&.Genarray\&.slice_right for more details\&. .B Array3\&.slice_right_2 applies only to arrays with Fortran layout\&. .sp .I val blit : .B ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit .sp Copy the first big array to the second big array\&. See .B Bigarray\&.Genarray\&.blit for more details\&. .sp .I val fill : .B ('a, 'b, 'c) t -> 'a -> unit .sp Fill the given big array with the given value\&. See .B Bigarray\&.Genarray\&.fill for more details\&. .sp .I val of_array : .B ('a, 'b) Bigarray.kind -> .B 'c Bigarray.layout -> 'a array array array -> ('a, 'b, 'c) t .sp Build a three\-dimensional big array initialized from the given array of arrays of arrays\&. .sp .I val map_file : .B Unix.file_descr -> .B ?pos:int64 -> .B ('a, 'b) Bigarray.kind -> .B 'c Bigarray.layout -> .B bool -> int -> int -> int -> ('a, 'b, 'c) t .sp Memory mapping of a file as a three\-dimensional big array\&. See .B Bigarray\&.Genarray\&.map_file for more details\&. .sp .I val unsafe_get : .B ('a, 'b, 'c) t -> int -> int -> int -> 'a .sp Like .B Bigarray\&.Array3\&.get , but bounds checking is not always performed\&. .sp .I val unsafe_set : .B ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit .sp Like .B Bigarray\&.Array3\&.set , but bounds checking is not always performed\&. .sp