Module CCArray.Sub

module Sub: sig .. end

type 'a t 
A slice is an array, an offset, and a length
val make : 'a array -> int -> len:int -> 'a t
Create a slice.
Raises Invalid_argument if the slice isn't valid
val of_slice : 'a array * int * int -> 'a t
Make a sub-array from a triple (arr, i, len) where arr is the array, i the offset in arr, and len the number of elements of the slice.
Raises Invalid_argument if the slice isn't valid (See CCArray.Sub.make)
val to_slice : 'a t -> 'a array * int * int
Convert into a triple (arr, i, len) where len is the length of the subarray of arr starting at offset i
val to_list : 'a t -> 'a list
Convert directly to a list
Since 0.21
val full : 'a array -> 'a t
Slice that covers the full array
val underlying : 'a t -> 'a array
Underlying array (shared). Modifying this array will modify the slice
val copy : 'a t -> 'a array
Copy into a new array
val sub : 'a t -> int -> int -> 'a t
Sub-slice
include CCArray.S