module DefStrat:Default strategy for resizable datastructuresStrat.Twith type t = float * float * int
type t is a triple waste, shrink_trig, min_size, where
waste (default: 1.5) indicates by how much the array should
be grown in excess when reallocation is triggered, shrink_trig
(default: 0.5) at which percentage of excess elements it should be
shrinked and min_size (default: 16 elements) is the minimum size
of the resizable array.
type t
val default : tval grow : t -> (int -> unit) -> int -> unitgrow strat resizer new_len grows some contiguous
datastructure using strategy strat to a new (virtual) length
new_len by calling its resizer function with its new (real)
length. Be careful, the new (real) length must be larger than
the new (virtual) length, otherwise your program will crash!val shrink : t -> (int -> unit) -> int -> int -> unitshrink strat resizer real_len new_len (possibly) shrinks
some contiguous datastructure of length real_len depending
on its demanded new (virtual) length new_len by calling its
resizer function with its new (real) length. Be careful, the new
(real) length must be larger than the new (virtual) length,
otherwise your program will crash!