Provided by: ocaml-nox_4.05.0-10ubuntu1_amd64

**NAME**

Bigarray.Array1 - One-dimensional arrays.

**Module**

Module Bigarray.Array1

**Documentation**

ModuleArray1:sigendOne-dimensional arrays. TheArray1structure provides operations similar to those ofBigarray.Genarray, but specialized to the case of one-dimensional arrays. (TheBigarray.Array2andBigarray.Array3structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.type('a,'b,'c)tThe type of one-dimensional big arrays whose elements have OCaml type'a, representation kind'b, and memory layout'c.valcreate:('a,'b)Bigarray.kind->'cBigarray.layout->int->('a,'b,'c)tArray1.createkindlayoutdimreturns a new bigarray of one dimension, whose size isdim.kindandlayoutdetermine the array element kind and the array layout as described forBigarray.Genarray.create.valdim:('a,'b,'c)t->intReturn the size (dimension) of the given one-dimensional big array.valkind:('a,'b,'c)t->('a,'b)Bigarray.kindReturn the kind of the given big array.vallayout:('a,'b,'c)t->'cBigarray.layoutReturn the layout of the given big array.valsize_in_bytes:('a,'b,'c)t->intsize_in_bytesais the number of elements inamultiplied bya'sBigarray.kind_size_in_bytes.Since4.03.0valget:('a,'b,'c)t->int->'aArray1.getax, or alternativelya.{x}, returns the element ofaat indexx.xmust be greater or equal than0and strictly less thanArray1.dimaifahas C layout. Ifahas Fortran layout,xmust be greater or equal than1and less or equal thanArray1.dima. Otherwise,Invalid_argumentis raised.valset:('a,'b,'c)t->int->'a->unitArray1.setaxv, also writtena.{x}<-v, stores the valuevat indexxina.xmust be inside the bounds ofaas described inBigarray.Array1.get; otherwise,Invalid_argumentis raised.valsub:('a,'b,'c)t->int->int->('a,'b,'c)tExtract a sub-array of the given one-dimensional big array. SeeBigarray.Genarray.sub_leftfor more details.valslice:('a,'b,'c)t->int->('a,'b,'c)Bigarray.Array0.tExtract a scalar (zero-dimensional slice) of the given one-dimensional big array. The integer parameter is the index of the scalar to extract. SeeBigarray.Genarray.slice_leftandBigarray.Genarray.slice_rightfor more details.Since4.05.0valblit:('a,'b,'c)t->('a,'b,'c)t->unitCopy the first big array to the second big array. SeeBigarray.Genarray.blitfor more details.valfill:('a,'b,'c)t->'a->unitFill the given big array with the given value. SeeBigarray.Genarray.fillfor more details.valof_array:('a,'b)Bigarray.kind->'cBigarray.layout->'aarray->('a,'b,'c)tBuild a one-dimensional big array initialized from the given array.valmap_file:Unix.file_descr->?pos:int64->('a,'b)Bigarray.kind->'cBigarray.layout->bool->int->('a,'b,'c)tMemory mapping of a file as a one-dimensional big array. SeeBigarray.Genarray.map_filefor more details.valunsafe_get:('a,'b,'c)t->int->'aLikeBigarray.Array1.get, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.valunsafe_set:('a,'b,'c)t->int->'a->unitLikeBigarray.Array1.set, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.