Frama-C API - Vector
Extensible Arrays
val create : unit -> 'a tval length : 'a t -> intval size : 'a t -> intSame as length
val get : 'a t -> int -> 'aRaise Not_found if out-of-bounds.
val set : 'a t -> int -> 'a -> unitRaise Not_found if out-of-bounds.
val add : 'a t -> 'a -> unitElement will be added at index size. After addition, it is at index size-1.
val addi : 'a t -> 'a -> intReturn index of added (last) element.
val clear : 'a t -> unitDo not modify actual capacity.
val iter : ('a -> unit) -> 'a t -> unitval iteri : (int -> 'a -> unit) -> 'a t -> unitval find : 'a t -> ?default:'a -> ?exn:exn -> int -> 'aDefault exception is Not_found. If a default value is provided, no exception is raised.
val update : 'a t -> ?default:'a -> int -> 'a -> unitSet value at index. If the updated index is greater of equal to the vector size, empty cells are inserted with the default value.
val to_array : 'a t -> 'a arrayMakes a copy.
val of_array : 'a array -> 'a tMakes a copy.
val capacity : 'a t -> intLow-level interface. Internal capacity.
val resize : 'a t -> int -> unitLow-level interface. Sets internal capacity. Extra elements are removed.
val shrink : 'a t -> unitLow-level interface. Sets capacity to content.
