module type T =sig..end
module Strategy:Strat.T
typestrategy =Strategy.t
type t
type el
val length : t -> intlength rara
excluding the reserved space.val lix : t -> intlix rara
excluding the reserved space.val real_length : t -> intreal_length rara
including the reserved space.val real_lix : t -> intreal_lix rara
including the reserved space.val get : t -> int -> elget ra nInvalid_argument if index out of bounds.nth element of ra.val set : t -> int -> el -> unitset ra n sets the nth element of ra.Invalid_argument if index out of bounds.val sempty : strategy -> tsempty ss.val empty : unit -> tempty () same as sempty but uses default strategy.val screate : strategy -> int -> tscreate s ns
containing n arbitrary elements.
Attention: the contents is not specified!
val create : int -> tcreate n same as screate but uses default strategy.val smake : strategy -> int -> el -> tsmake s n eln
containing element el only using strategy s.val make : int -> el -> tmake n el same as smake but uses default strategy.val sinit : strategy -> int -> (int -> el) -> tsinit s n fn containing
elements that were created by applying function f to the index,
using strategy s.val init : int -> (int -> el) -> tinit n f sames as sinit but uses default strategy.val get_strategy : t -> strategyget_strategy rara.val set_strategy : t -> strategy -> unitset_strategy ra s sets the reallocation strategy of
resizable array ra to s, possibly causing an immediate
reallocation.val put_strategy : t -> strategy -> unitput_strategy ra s sets the reallocation strategy of
resizable array ra to s. Reallocation is only done at later
changes in size.val enforce_strategy : t -> unitenforce_strategy ra forces a reallocation if necessary
(e.g. after a put_strategy.val copy : t -> tcopy rara. The two
arrays share the same strategy!val sub : t -> int -> int -> tsub ra ofs lenInvalid_argument if parameters do not denote a correct
subarray.len
from resizable array ra starting at offset ofs using the
default strategy.val fill : t -> int -> int -> el -> unitfill ra ofs len el fills resizable array ra from offset
ofs with len elements el, possibly adding elements at the
end. Raises Invalid_argument if offset ofs is larger than the
length of the array.val blit : t -> int -> t -> int -> int -> unitblit ra1 ofs1 ra2 ofs2 len blits resizable array ra1 onto
ra2 reading len elements from offset ofs1 and writing them
to ofs2, possibly adding elements at the end of ra2. Raises
Invalid_argument if ofs1 and len do not designate a valid
subarray of ra1 or if ofs2 is larger than the length of
ra2.val append : t -> t -> tappend ra1 ra2ra1 and ra2 in this order onto
it.val concat : t list -> tconcat ll in their respective
order onto it.val add_one : t -> el -> unitadd_one ra el adds element el to resizable array ra,
possibly causing a reallocation.val remove_one : t -> unitremove_one ra removes the last element of resizable array
ra, possibly causing a reallocation.Failure if the array is empty.val remove_n : t -> int -> unitremove_n ra n removes the last n elements of resizable
array ra, possibly causing a reallocation.Invalid_arg if there are not enough elements or n < 0.val remove_range : t -> int -> int -> unitremove_range ra ofs len removes len elements from resizable
array ra starting at ofs and possibly causing a
reallocation.Invalid_argument if range is invalid.val clear : t -> unitclear ra removes all elements from resizable array ra,
possibly causing a reallocation.val swap : t -> int -> int -> unitswap ra n m swaps elements at indices n and m.Invalid_argument if any index is out of range.val swap_in_last : t -> int -> unitswap_in_last ra n swaps the last element with the one at
position n.Invalid_argument if index n is out of range.val to_array : t -> el arrayto_array ra converts a resizable array to a standard one.val sof_array : strategy -> el array -> tsof_array s ar converts a standard array to a resizable one,
using strategy s.val of_array : el array -> tof_array ar converts a standard array to a resizable one
using the default strategy.val to_list : t -> el listto_list ra converts resizable array ra to a list.val sof_list : strategy -> el list -> tsof_list s l creates a resizable array using strategy s and
the elements in list l.val of_list : el list -> tof_list l creates a resizable array using the default
strategy and the elements in list l.val iter : (el -> unit) -> t -> unititer f ra applies the unit-function f to each element in
resizable array ra.val map : (el -> el) -> t -> tmap f rara and mapping each element in ra to its corresponding position
in the new array using function f.val iteri : (int -> el -> unit) -> t -> unititeri f ra applies the unit-function f to each index and
element in resizable array ra.val mapi : (int -> el -> el) ->
t -> tmapi f rara and mapping each element in ra to its corresponding
position in the new array using function f and the index
position.val fold_left : ('a -> el -> 'a) -> 'a -> t -> 'afold_left f a ra left-folds values in resizable array ra
using function f and start accumulator a.val fold_right : (el -> 'a -> 'a) -> t -> 'a -> 'afold_right f a ra right-folds values in resizable array ra
using function f and start accumulator a.val for_all : (el -> bool) -> t -> boolfor_all p ratrue if all elements in resizable
array ra satisfy the predicate p, false otherwise.val exists : (el -> bool) -> t -> boolexists p ratrue if at least one element in
resizable array ra satisfies the predicate p, false
otherwise.val mem : el -> t -> boolmem el ratrue if element el is logically equal
to any element in resizable array ra, false otherwise.val memq : el -> t -> boolmemq el ratrue if element el is physically equal
to any element in resizable array ra, false otherwise.val pos : el -> t -> int optionpos el raSome index if el is logically
equal to the element at index in ra, None otherwise. index
is the index of the first element that matches.val posq : el -> t -> int optionposq el raSome index if el is physically
equal to the element at index in ra, None otherwise. index
is the index of the first element that matches.val find : (el -> bool) -> t -> elfind p raNot_found if there is no such element.ra
that satisfies predicate p.val find_index : (el -> bool) -> t -> int -> intfind_index p ra posNot_found if there is no such element or if pos is larger
than the highest index.Invalid_argument if pos is negative.p in resizable array ra, starting
search at index pos.val filter : (el -> bool) -> t -> tfilter p rara that satisfy predicate p using the same
strategy as ra.val find_all : (el -> bool) -> t -> tfind_all p ra is the same as filterval filter_in_place : (el -> bool) -> t -> unitfilter_in_place p ra as filter, but filters in place.val partition : (el -> bool) ->
t -> t * tpartition p rara that satisfy predicate
p, the right one only those that do not satisfy it. Both returned
arrays are created using the strategy of ra.val unsafe_get : t -> int -> el
val unsafe_set : t -> int -> el -> unit
val unsafe_sub : t -> int -> int -> t
val unsafe_fill : t -> int -> int -> el -> unit
val unsafe_blit : t -> int -> t -> int -> int -> unit
val unsafe_remove_one : t -> unit
val unsafe_remove_n : t -> int -> unit
val unsafe_swap : t -> int -> int -> unit
val unsafe_swap_in_last : t -> int -> unit