Module Msat__.Vec
val make : int -> 'a -> 'a tmake cap dummycreates a new vector filled withdummy. The vector is initially empty but its underlying array has capacitycap.dummywill stay alive as long as the vector
val to_array : 'a t -> 'a arrayval of_list : 'a list -> 'a tval to_seq : 'a t -> 'a Iter.tval clear : 'a t -> unitSet size to 0, doesn't free elements
val shrink : 'a t -> int -> unitshrink vec szresets size ofvectosz. Assumessz >=0 && sz <= size vec
val pop : 'a t -> 'aPop last element and return it.
- raises Invalid_argument
if the vector is empty
val size : 'a t -> intval is_empty : 'a t -> boolval is_full : 'a t -> boolIs the capacity of the vector equal to the number of its elements?
val push : 'a t -> 'a -> unitPush element into the vector
val get : 'a t -> int -> 'aget the element at the given index, or
- raises Invalid_argument
if the index is not valid
val set : 'a t -> int -> 'a -> unitset the element at the given index, either already set or the first free slot if
not (is_full vec), or- raises Invalid_argument
if the index is not valid
val fast_remove : 'a t -> int -> unitRemove element at index
iwithout preserving order (swap with last element)
val filter_in_place : ('a -> bool) -> 'a t -> unitfilter_in_place f vremoves fromvthe elements that do not satisfyf
val sort : 'a t -> ('a -> 'a -> int) -> unitSort in place the array
val iter : ('a -> unit) -> 'a t -> unitIterate on elements
val iteri : (int -> 'a -> unit) -> 'a t -> unitIterate on elements with their index
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bFold over elements
val exists : ('a -> bool) -> 'a t -> boolDoes there exist an element that satisfies the predicate?
val for_all : ('a -> bool) -> 'a t -> boolDo all elements satisfy the predicate?
val pp : ?sep:string -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit