Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Res.DefStrat
Default strategy for resizable datastructures
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.
the new real length of some contiguous datastructure using strategy strat given new virtual length new_len. The user should then use this new real length to resize the datastructure.
Be careful, the new (real) length must be larger than the new virtual length, otherwise your program will crash!
the new real length of a resizable datastructure given its current real length real_len and its required new virtual length new_len wrt. strategy strat. The user should then use this new real length to resize the datastructure. If -1 is returned, it is not necessary to resize.
Be careful, the new (real) length must be larger than the new (virtual) length, otherwise your program may crash!