1Bigarray.Array0(3)               OCaml library              Bigarray.Array0(3)
2
3
4

NAME

6       Bigarray.Array0 - Zero-dimensional arrays.
7

Module

9       Module   Bigarray.Array0
10

Documentation

12       Module Array0
13        : sig end
14
15
16       Zero-dimensional arrays. The Array0 structure provides operations simi‐
17       lar to those of Bigarray.Genarray , but  specialized  to  the  case  of
18       zero-dimensional arrays that only contain a single scalar value.  Stat‐
19       ically knowing the number of dimensions of the array allows faster  op‐
20       erations, and more precise static type-checking.
21
22
23       Since 4.05.0
24
25
26
27
28
29       type ('a, 'b, 'c) t
30
31
32       The  type  of zero-dimensional Bigarrays whose elements have OCaml type
33       'a , representation kind 'b , and memory layout 'c .
34
35
36
37       val create : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout ->  ('a,  'b,
38       'c) t
39
40
41       Array0.create  kind  layout  returns  a new Bigarray of zero dimension.
42       kind and layout determine the array element kind and the  array  layout
43       as described for Bigarray.Genarray.create .
44
45
46
47       val kind : ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kind
48
49       Return the kind of the given Bigarray.
50
51
52
53       val layout : ('a, 'b, 'c) t -> 'c Bigarray.layout
54
55       Return the layout of the given Bigarray.
56
57
58
59       val  change_layout  :  ('a, 'b, 'c) t -> 'd Bigarray.layout -> ('a, 'b,
60       'd) t
61
62
63       Array0.change_layout a layout returns a  Bigarray  with  the  specified
64       layout  , sharing the data with a . No copying of elements is involved:
65       the new array and the original array share the same storage space.
66
67
68       Since 4.06.0
69
70
71
72       val size_in_bytes : ('a, 'b, 'c) t -> int
73
74
75       size_in_bytes a is a 's Bigarray.kind_size_in_bytes .
76
77
78
79       val get : ('a, 'b, 'c) t -> 'a
80
81
82       Array0.get a returns the only element in a .
83
84
85
86       val set : ('a, 'b, 'c) t -> 'a -> unit
87
88
89       Array0.set a x v stores the value v in a .
90
91
92
93       val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
94
95       Copy the first Bigarray to the second  Bigarray.   See  Bigarray.Genar‐
96       ray.blit for more details.
97
98
99
100       val fill : ('a, 'b, 'c) t -> 'a -> unit
101
102       Fill  the  given  Bigarray  with  the given value.  See Bigarray.Genar‐
103       ray.fill for more details.
104
105
106
107       val of_value : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout  ->  'a  ->
108       ('a, 'b, 'c) t
109
110       Build a zero-dimensional Bigarray initialized from the given value.
111
112
113
114
115
116OCamldoc                          2021-01-26                Bigarray.Array0(3)
Impressum