|
66 | 66 | "detail": "(t<'a>, (. 'a) => 'b) => t<'b>",
|
67 | 67 | "documentation": {"kind": "markdown", "value": "\nbelt_List.mli:298"}
|
68 | 68 | }]
|
| 69 | +[{ |
| 70 | + "label": "Floatarray", |
| 71 | + "kind": 9, |
| 72 | + "tags": [], |
| 73 | + "detail": "module", |
| 74 | + "documentation": {"kind": "markdown", "value": "\narray.mli:267"} |
| 75 | + }, { |
| 76 | + "label": "fold_left", |
| 77 | + "kind": 12, |
| 78 | + "tags": [], |
| 79 | + "detail": "(('a, 'b) => 'a, 'a, array<'b>) => 'a", |
| 80 | + "documentation": {"kind": "markdown", "value": "`Array.fold_left f x a` computes `f (... (f (f x a.(0)) a.(1)) ...) a.(n-1)`, where `n` is the length of the array `a`.\n\n\n\n\narray.mli:160"} |
| 81 | + }, { |
| 82 | + "label": "concat", |
| 83 | + "kind": 12, |
| 84 | + "tags": [], |
| 85 | + "detail": "list<array<'a>> => array<'a>", |
| 86 | + "documentation": {"kind": "markdown", "value": "Same as append, but concatenates a list of arrays.\n\n\n\n\narray.mli:95"} |
| 87 | + }, { |
| 88 | + "label": "mapi", |
| 89 | + "kind": 12, |
| 90 | + "tags": [], |
| 91 | + "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", |
| 92 | + "documentation": {"kind": "markdown", "value": "Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.\n\n\n\n\narray.mli:155"} |
| 93 | + }, { |
| 94 | + "label": "exists", |
| 95 | + "kind": 12, |
| 96 | + "tags": [], |
| 97 | + "detail": "('a => bool, array<'a>) => bool", |
| 98 | + "documentation": {"kind": "markdown", "value": "`Array.exists p [|a1; ...; an|]` checks if at least one element of the array satisfies the predicate `p`. That is, it returns `(p a1) || (p a2) || ... || (p an)`.\n\nSince: 4.03.0\n\n\narray.mli:197"} |
| 99 | + }, { |
| 100 | + "label": "for_all", |
| 101 | + "kind": 12, |
| 102 | + "tags": [], |
| 103 | + "detail": "('a => bool, array<'a>) => bool", |
| 104 | + "documentation": {"kind": "markdown", "value": "`Array.for_all p [|a1; ...; an|]` checks if all elements of the array satisfy the predicate `p`. That is, it returns `(p a1) && (p a2) && ... && (p an)`.\n\nSince: 4.03.0\n\n\narray.mli:191"} |
| 105 | + }, { |
| 106 | + "label": "copy", |
| 107 | + "kind": 12, |
| 108 | + "tags": [], |
| 109 | + "detail": "array<'a> => array<'a>", |
| 110 | + "documentation": {"kind": "markdown", "value": "`Array.copy a` returns a copy of `a`, that is, a fresh array containing the same elements as `a`.\n\n\n\n\narray.mli:107"} |
| 111 | + }, { |
| 112 | + "label": "iter2", |
| 113 | + "kind": 12, |
| 114 | + "tags": [], |
| 115 | + "detail": "(('a, 'b) => unit, array<'a>, array<'b>) => unit", |
| 116 | + "documentation": {"kind": "markdown", "value": "`Array.iter2 f a b` applies function `f` to all the elements of `a` and `b`. Raise `Invalid_argument` if the arrays are not the same size.\n\nSince: 4.03.0\n\n\narray.mli:174"} |
| 117 | + }, { |
| 118 | + "label": "to_list", |
| 119 | + "kind": 12, |
| 120 | + "tags": [], |
| 121 | + "detail": "array<'a> => list<'a>", |
| 122 | + "documentation": {"kind": "markdown", "value": "`Array.to_list a` returns the list of all the elements of `a`.\n\n\n\n\narray.mli:129"} |
| 123 | + }, { |
| 124 | + "label": "stable_sort", |
| 125 | + "kind": 12, |
| 126 | + "tags": [], |
| 127 | + "detail": "(('a, 'a) => int, array<'a>) => unit", |
| 128 | + "documentation": {"kind": "markdown", "value": "Same as sort, but the sorting algorithm is stable \\(i.e. elements that compare equal are kept in their original order\\) and not guaranteed to run in constant heap space.\n\nThe current implementation uses Merge Sort. It uses `n/2` words of heap space, where `n` is the length of the array. It is usually faster than the current implementation of sort.\n\n\n\n\narray.mli:243"} |
| 129 | + }, { |
| 130 | + "label": "iteri", |
| 131 | + "kind": 12, |
| 132 | + "tags": [], |
| 133 | + "detail": "((int, 'a) => unit, array<'a>) => unit", |
| 134 | + "documentation": {"kind": "markdown", "value": "Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.\n\n\n\n\narray.mli:145"} |
| 135 | + }, { |
| 136 | + "label": "memq", |
| 137 | + "kind": 12, |
| 138 | + "tags": [], |
| 139 | + "detail": "('a, array<'a>) => bool", |
| 140 | + "documentation": {"kind": "markdown", "value": "Same as mem, but uses physical equality instead of structural equality to compare array elements.\n\nSince: 4.03.0\n\n\narray.mli:208"} |
| 141 | + }, { |
| 142 | + "label": "map2", |
| 143 | + "kind": 12, |
| 144 | + "tags": [], |
| 145 | + "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", |
| 146 | + "documentation": {"kind": "markdown", "value": "`Array.map2 f a b` applies function `f` to all the elements of `a` and `b`, and builds an array with the results returned by `f`: `[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]`. Raise `Invalid_argument` if the arrays are not the same size.\n\nSince: 4.03.0\n\n\narray.mli:180"} |
| 147 | + }, { |
| 148 | + "label": "set", |
| 149 | + "kind": 12, |
| 150 | + "tags": [], |
| 151 | + "detail": "(array<'a>, int, 'a) => unit", |
| 152 | + "documentation": {"kind": "markdown", "value": "`Array.set a n x` modifies array `a` in place, replacing element number `n` with `x`. You can also write `a.(n) <- x` instead of `Array.set a n x`.\n\nRaise `Invalid_argument \"index out of bounds\"` if `n` is outside the range 0 to `Array.length a - 1`.\n\n\n\n\narray.mli:30"} |
| 153 | + }, { |
| 154 | + "label": "make", |
| 155 | + "kind": 12, |
| 156 | + "tags": [], |
| 157 | + "detail": "(int, 'a) => array<'a>", |
| 158 | + "documentation": {"kind": "markdown", "value": "`Array.make n x` returns a fresh array of length `n`, initialized with `x`. All the elements of this new array are initially physically equal to `x` \\(in the sense of the `==` predicate\\). Consequently, if `x` is mutable, it is shared among all elements of the array, and modifying `x` through one of the array entries will modify all other entries at the same time.\n\nRaise `Invalid_argument` if `n < 0` or `n > Sys.max_array_length`. If the value of `x` is a floating-point number, then the maximum size is only `Sys.max_array_length / 2`.\n\n\n\n\narray.mli:38"} |
| 159 | + }, { |
| 160 | + "label": "make_float", |
| 161 | + "kind": 12, |
| 162 | + "tags": [], |
| 163 | + "detail": "int => array<float>", |
| 164 | + "documentation": {"kind": "markdown", "value": "Deprecated: `Array.make_float` is an alias for create_float.\n\n\n\n\n\n\narray.mli:60"} |
| 165 | + }, { |
| 166 | + "label": "fold_right", |
| 167 | + "kind": 12, |
| 168 | + "tags": [], |
| 169 | + "detail": "(('b, 'a) => 'a, array<'b>, 'a) => 'a", |
| 170 | + "documentation": {"kind": "markdown", "value": "`Array.fold_right f a x` computes `f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...))`, where `n` is the length of the array `a`.\n\n\n\n\narray.mli:165"} |
| 171 | + }, { |
| 172 | + "label": "sort", |
| 173 | + "kind": 12, |
| 174 | + "tags": [], |
| 175 | + "detail": "(('a, 'a) => int, array<'a>) => unit", |
| 176 | + "documentation": {"kind": "markdown", "value": "Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller \\(see below for a complete specification\\). For example, compare is a suitable comparison function, provided there are no floating-point NaN values in the data. After calling `Array.sort`, the array is sorted in place in increasing order. `Array.sort` is guaranteed to run in constant heap space and \\(at most\\) logarithmic stack space.\n\nThe current implementation uses Heap Sort. It runs in constant stack space.\n\nSpecification of the comparison function: Let `a` be the array and `cmp` the comparison function. The following must be true for all x, y, z in a :\n\n- `cmp x y` \\> 0 if and only if `cmp y x` < 0\n\n\n- if `cmp x y` \\>= 0 and `cmp y z` \\>= 0 then `cmp x z` \\>= 0\n\n\n\nWhen `Array.sort` returns, `a` contains the same elements as before, reordered in such a way that for all i and j valid indices of `a` :\n\n- `cmp a.(i) a.(j)` \\>= 0 if and only if i \\>= j\n\n\n\n\n\n\narray.mli:217"} |
| 177 | + }, { |
| 178 | + "label": "length", |
| 179 | + "kind": 12, |
| 180 | + "tags": [], |
| 181 | + "detail": "array<'a> => int", |
| 182 | + "documentation": {"kind": "markdown", "value": "Return the length \\(number of elements\\) of the given array.\n\n\n\n\narray.mli:18"} |
| 183 | + }, { |
| 184 | + "label": "sub", |
| 185 | + "kind": 12, |
| 186 | + "tags": [], |
| 187 | + "detail": "(array<'a>, int, int) => array<'a>", |
| 188 | + "documentation": {"kind": "markdown", "value": "`Array.sub a start len` returns a fresh array of length `len`, containing the elements number `start` to `start + len - 1` of array `a`.\n\nRaise `Invalid_argument \"Array.sub\"` if `start` and `len` do not designate a valid subarray of `a`; that is, if `start < 0`, or `len < 0`, or `start + len > Array.length a`.\n\n\n\n\narray.mli:98"} |
| 189 | + }, { |
| 190 | + "label": "of_list", |
| 191 | + "kind": 12, |
| 192 | + "tags": [], |
| 193 | + "detail": "list<'a> => array<'a>", |
| 194 | + "documentation": {"kind": "markdown", "value": "`Array.of_list l` returns a fresh array containing the elements of `l`.\n\n\n\n\narray.mli:132"} |
| 195 | + }, { |
| 196 | + "label": "iter", |
| 197 | + "kind": 12, |
| 198 | + "tags": [], |
| 199 | + "detail": "('a => unit, array<'a>) => unit", |
| 200 | + "documentation": {"kind": "markdown", "value": "`Array.iter f a` applies function `f` in turn to all the elements of `a`. It is equivalent to `f a.(0); f a.(1); ...; f a.(Array.length a - 1); ()`.\n\n\n\n\narray.mli:140"} |
| 201 | + }, { |
| 202 | + "label": "map", |
| 203 | + "kind": 12, |
| 204 | + "tags": [], |
| 205 | + "detail": "('a => 'b, array<'a>) => array<'b>", |
| 206 | + "documentation": {"kind": "markdown", "value": "`Array.map f a` applies function `f` to all the elements of `a`, and builds an array with the results returned by `f`: `[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]`.\n\n\n\n\narray.mli:150"} |
| 207 | + }, { |
| 208 | + "label": "unsafe_get", |
| 209 | + "kind": 12, |
| 210 | + "tags": [], |
| 211 | + "detail": "(array<'a>, int) => 'a", |
| 212 | + "documentation": {"kind": "markdown", "value": "\narray.mli:264"} |
| 213 | + }, { |
| 214 | + "label": "make_matrix", |
| 215 | + "kind": 12, |
| 216 | + "tags": [], |
| 217 | + "detail": "(int, int, 'a) => array<array<'a>>", |
| 218 | + "documentation": {"kind": "markdown", "value": "`Array.make_matrix dimx dimy e` returns a two-dimensional array \\(an array of arrays\\) with first dimension `dimx` and second dimension `dimy`. All the elements of this new matrix are initially physically equal to `e`. The element \\(`x,y`\\) of a matrix `m` is accessed with the notation `m.(x).(y)`.\n\nRaise `Invalid_argument` if `dimx` or `dimy` is negative or greater than max_array_length. If the value of `e` is a floating-point number, then the maximum size is only `Sys.max_array_length / 2`.\n\n\n\n\narray.mli:74"} |
| 219 | + }, { |
| 220 | + "label": "mem", |
| 221 | + "kind": 12, |
| 222 | + "tags": [], |
| 223 | + "detail": "('a, array<'a>) => bool", |
| 224 | + "documentation": {"kind": "markdown", "value": "`mem a l` is true if and only if `a` is equal to an element of `l`.\n\nSince: 4.03.0\n\n\narray.mli:203"} |
| 225 | + }, { |
| 226 | + "label": "get", |
| 227 | + "kind": 12, |
| 228 | + "tags": [], |
| 229 | + "detail": "(array<'a>, int) => 'a", |
| 230 | + "documentation": {"kind": "markdown", "value": "`Array.get a n` returns the element number `n` of array `a`. The first element has number 0. The last element has number `Array.length a - 1`. You can also write `a.(n)` instead of `Array.get a n`.\n\nRaise `Invalid_argument \"index out of bounds\"` if `n` is outside the range 0 to `(Array.length a - 1)`.\n\n\n\n\narray.mli:21"} |
| 231 | + }, { |
| 232 | + "label": "append", |
| 233 | + "kind": 12, |
| 234 | + "tags": [], |
| 235 | + "detail": "(array<'a>, array<'a>) => array<'a>", |
| 236 | + "documentation": {"kind": "markdown", "value": "`Array.append v1 v2` returns a fresh array containing the concatenation of the arrays `v1` and `v2`.\n\n\n\n\narray.mli:91"} |
| 237 | + }, { |
| 238 | + "label": "unsafe_set", |
| 239 | + "kind": 12, |
| 240 | + "tags": [], |
| 241 | + "detail": "(array<'a>, int, 'a) => unit", |
| 242 | + "documentation": {"kind": "markdown", "value": "\narray.mli:265"} |
| 243 | + }, { |
| 244 | + "label": "create_matrix", |
| 245 | + "kind": 12, |
| 246 | + "tags": [], |
| 247 | + "detail": "(int, int, 'a) => array<array<'a>>", |
| 248 | + "documentation": {"kind": "markdown", "value": "Deprecated: `Array.create_matrix` is an alias for make_matrix.\n\n\n\n\n\n\narray.mli:87"} |
| 249 | + }, { |
| 250 | + "label": "create_float", |
| 251 | + "kind": 12, |
| 252 | + "tags": [], |
| 253 | + "detail": "int => array<float>", |
| 254 | + "documentation": {"kind": "markdown", "value": "`Array.create_float n` returns a fresh float array of length `n`, with uninitialized data.\n\nSince: 4.03\n\n\narray.mli:55"} |
| 255 | + }, { |
| 256 | + "label": "create", |
| 257 | + "kind": 12, |
| 258 | + "tags": [], |
| 259 | + "detail": "(int, 'a) => array<'a>", |
| 260 | + "documentation": {"kind": "markdown", "value": "Deprecated: `Array.create` is an alias for make.\n\n\n\n\n\n\narray.mli:51"} |
| 261 | + }, { |
| 262 | + "label": "init", |
| 263 | + "kind": 12, |
| 264 | + "tags": [], |
| 265 | + "detail": "(int, int => 'a) => array<'a>", |
| 266 | + "documentation": {"kind": "markdown", "value": "`Array.init n f` returns a fresh array of length `n`, with element number `i` initialized to the result of `f i`. In other terms, `Array.init n f` tabulates the results of `f` applied to the integers `0` to `n-1`.\n\nRaise `Invalid_argument` if `n < 0` or `n > Sys.max_array_length`. If the return type of `f` is `float`, then the maximum size is only `Sys.max_array_length / 2`.\n\n\n\n\narray.mli:64"} |
| 267 | + }, { |
| 268 | + "label": "fast_sort", |
| 269 | + "kind": 12, |
| 270 | + "tags": [], |
| 271 | + "detail": "(('a, 'a) => int, array<'a>) => unit", |
| 272 | + "documentation": {"kind": "markdown", "value": "Same as sort or stable_sort, whichever is faster on typical input.\n\n\n\n\narray.mli:253"} |
| 273 | + }, { |
| 274 | + "label": "fill", |
| 275 | + "kind": 12, |
| 276 | + "tags": [], |
| 277 | + "detail": "(array<'a>, int, int, 'a) => unit", |
| 278 | + "documentation": {"kind": "markdown", "value": "`Array.fill a ofs len x` modifies the array `a` in place, storing `x` in elements number `ofs` to `ofs + len - 1`.\n\nRaise `Invalid_argument \"Array.fill\"` if `ofs` and `len` do not designate a valid subarray of `a`.\n\n\n\n\narray.mli:111"} |
| 279 | + }, { |
| 280 | + "label": "blit", |
| 281 | + "kind": 12, |
| 282 | + "tags": [], |
| 283 | + "detail": "(array<'a>, int, array<'a>, int, int) => unit", |
| 284 | + "documentation": {"kind": "markdown", "value": "`Array.blit v1 o1 v2 o2 len` copies `len` elements from array `v1`, starting at element number `o1`, to array `v2`, starting at element number `o2`. It works correctly even if `v1` and `v2` are the same array, and the source and destination chunks overlap.\n\nRaise `Invalid_argument \"Array.blit\"` if `o1` and `len` do not designate a valid subarray of `v1`, or if `o2` and `len` do not designate a valid subarray of `v2`.\n\n\n\n\narray.mli:118"} |
| 285 | + }] |
| 286 | +[{ |
| 287 | + "label": "mapi", |
| 288 | + "kind": 12, |
| 289 | + "tags": [], |
| 290 | + "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", |
| 291 | + "documentation": {"kind": "markdown", "value": "Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.\n\n\n\n\narray.mli:155"} |
| 292 | + }, { |
| 293 | + "label": "memq", |
| 294 | + "kind": 12, |
| 295 | + "tags": [], |
| 296 | + "detail": "('a, array<'a>) => bool", |
| 297 | + "documentation": {"kind": "markdown", "value": "Same as mem, but uses physical equality instead of structural equality to compare array elements.\n\nSince: 4.03.0\n\n\narray.mli:208"} |
| 298 | + }, { |
| 299 | + "label": "map2", |
| 300 | + "kind": 12, |
| 301 | + "tags": [], |
| 302 | + "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", |
| 303 | + "documentation": {"kind": "markdown", "value": "`Array.map2 f a b` applies function `f` to all the elements of `a` and `b`, and builds an array with the results returned by `f`: `[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]`. Raise `Invalid_argument` if the arrays are not the same size.\n\nSince: 4.03.0\n\n\narray.mli:180"} |
| 304 | + }, { |
| 305 | + "label": "make", |
| 306 | + "kind": 12, |
| 307 | + "tags": [], |
| 308 | + "detail": "(int, 'a) => array<'a>", |
| 309 | + "documentation": {"kind": "markdown", "value": "`Array.make n x` returns a fresh array of length `n`, initialized with `x`. All the elements of this new array are initially physically equal to `x` \\(in the sense of the `==` predicate\\). Consequently, if `x` is mutable, it is shared among all elements of the array, and modifying `x` through one of the array entries will modify all other entries at the same time.\n\nRaise `Invalid_argument` if `n < 0` or `n > Sys.max_array_length`. If the value of `x` is a floating-point number, then the maximum size is only `Sys.max_array_length / 2`.\n\n\n\n\narray.mli:38"} |
| 310 | + }, { |
| 311 | + "label": "make_float", |
| 312 | + "kind": 12, |
| 313 | + "tags": [], |
| 314 | + "detail": "int => array<float>", |
| 315 | + "documentation": {"kind": "markdown", "value": "Deprecated: `Array.make_float` is an alias for create_float.\n\n\n\n\n\n\narray.mli:60"} |
| 316 | + }, { |
| 317 | + "label": "map", |
| 318 | + "kind": 12, |
| 319 | + "tags": [], |
| 320 | + "detail": "('a => 'b, array<'a>) => array<'b>", |
| 321 | + "documentation": {"kind": "markdown", "value": "`Array.map f a` applies function `f` to all the elements of `a`, and builds an array with the results returned by `f`: `[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]`.\n\n\n\n\narray.mli:150"} |
| 322 | + }, { |
| 323 | + "label": "make_matrix", |
| 324 | + "kind": 12, |
| 325 | + "tags": [], |
| 326 | + "detail": "(int, int, 'a) => array<array<'a>>", |
| 327 | + "documentation": {"kind": "markdown", "value": "`Array.make_matrix dimx dimy e` returns a two-dimensional array \\(an array of arrays\\) with first dimension `dimx` and second dimension `dimy`. All the elements of this new matrix are initially physically equal to `e`. The element \\(`x,y`\\) of a matrix `m` is accessed with the notation `m.(x).(y)`.\n\nRaise `Invalid_argument` if `dimx` or `dimy` is negative or greater than max_array_length. If the value of `e` is a floating-point number, then the maximum size is only `Sys.max_array_length / 2`.\n\n\n\n\narray.mli:74"} |
| 328 | + }, { |
| 329 | + "label": "mem", |
| 330 | + "kind": 12, |
| 331 | + "tags": [], |
| 332 | + "detail": "('a, array<'a>) => bool", |
| 333 | + "documentation": {"kind": "markdown", "value": "`mem a l` is true if and only if `a` is equal to an element of `l`.\n\nSince: 4.03.0\n\n\narray.mli:203"} |
| 334 | + }] |
0 commit comments