Module Sek__.ArrayExtra

val iter : (Sek__.PrivateSignatures.pov -> 'c -> 'a Sek__.PublicTypeAbbreviations.segments) -> Sek__.PrivateSignatures.pov -> ('a -> unit) -> 'c -> unit

iter transforms an iter_segments function, which performs per-segment iteration over a collection, into an iter function, which performs per-element iteration.

val iter2 : (Sek__.PrivateSignatures.pov -> 'c1 -> 'c2 -> ('a1'a2) Sek__.PublicTypeAbbreviations.segments2) -> Sek__.PrivateSignatures.pov -> ('a1 -> 'a2 -> unit) -> 'c1 -> 'c2 -> unit

iter2 transforms an iter2_segments function, which performs per-segment iteration over two collections, into an iter2 function, which performs per-element iteration.

val fill_circularly : 'a array -> Sek__.PublicTypeAbbreviations.index -> Sek__.PublicTypeAbbreviations.length -> 'a -> unit

fill_circularly a i k x fills the array a2, starting at index i2, with k copies of the value x. The destination array is regarded as circular, so it is permitted for the destination range to wrap around.

val blit_circularly : 'a array -> Sek__.PublicTypeAbbreviations.index -> 'a array -> Sek__.PublicTypeAbbreviations.index -> Sek__.PublicTypeAbbreviations.length -> unit

blit_circularly a1 i1 a2 i2 k copies k elements from the array a1, starting at index i1, to the array a2, starting at index i2. Both the source array and the destination array are regarded as circular, so it is permitted for the source range or destination range to wrap around. i1 must be comprised between 0 included and Array.length a1 excluded. i2 must be comprised between 0 included and Array.length a2 excluded. k must be comprised between 0 included and Array.length a2 included.

val cut : Sek__.PublicTypeAbbreviations.capacity -> Sek__.PublicTypeAbbreviations.capacity -> Sek__.PublicTypeAbbreviations.length -> (Sek__.PublicTypeAbbreviations.index * Sek__.PublicTypeAbbreviations.length) * ((Sek__.PublicTypeAbbreviations.index -> Sek__.PublicTypeAbbreviations.length -> unit) -> unit) * (Sek__.PublicTypeAbbreviations.index * Sek__.PublicTypeAbbreviations.length)

cut n0 n size distributes size elements into a front segment of size min n0 size, followed with a number of segments of size n, followed with a last segment of some size no greater than n. It returns a triple of the front segment, an iterator on the segments in the middle range, and the back segment. Each segment is described by an index and a length. n must be positive. cut guarantees that if the front or back segment is empty, then there are no segments in the middle range.

val concat_segments : Sek__.PrivateSignatures.pov -> 'a -> Sek__.PublicTypeAbbreviations.capacity -> 'a Sek__.PublicTypeAbbreviations.segments -> 'a array

concat_segments pov default n segments creates an array of length n and populates it by copying data from a series of array segments. segments is an iterator on triples of the form a, i, k, where a is an array, i is a start offset in a, and k is a length. The integer n must be the sum of the lengths of the segments. When pov is Back, the segments must be produced in reverse order. The data in each segment remains described from left to right. For example, if the first segment is a1, i1, k1 and the second one is a2, i2, k2 then the resulting array stores first the values from a2.(i2) to a2.(i2+k2-1), then the values from a1.(i1) to a1.(i1+k1-1).