1Bigarray.Array0(3) OCamldoc Bigarray.Array0(3)
2
3
4
6 Bigarray.Array0 - Zero-dimensional arrays.
7
9 Module Bigarray.Array0
10
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
20 operations, 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 big arrays 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 big array.
50
51
52
53 val layout : ('a, 'b, 'c) t -> 'c Bigarray.layout
54
55 Return the layout of the given big array.
56
57
58
59 val size_in_bytes : ('a, 'b, 'c) t -> int
60
61
62 size_in_bytes a is a 's Bigarray.kind_size_in_bytes .
63
64
65
66 val get : ('a, 'b, 'c) t -> 'a
67
68
69 Array0.get a returns the only element in a .
70
71
72
73 val set : ('a, 'b, 'c) t -> 'a -> unit
74
75
76 Array0.set a x v stores the value v in a .
77
78
79
80 val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
81
82 Copy the first big array to the second big array. See Bigarray.Genar‐
83 ray.blit for more details.
84
85
86
87 val fill : ('a, 'b, 'c) t -> 'a -> unit
88
89 Fill the given big array with the given value. See Bigarray.Genar‐
90 ray.fill for more details.
91
92
93
94 val of_value : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> 'a ->
95 ('a, 'b, 'c) t
96
97 Build a zero-dimensional big array initialized from the given value.
98
99
100
101
102
1032018-04-14 source: Bigarray.Array0(3)