Go to the first, previous, next, last section, table of contents.


The Res module

Contains strategy related parts.

module Strat : sig

Module interface of strategies

  module
 type T = sig
    type t

The abstract type of strategies.

    val default : t

Default strategy of this strategy implementation

    val grow : t -> (int -> unit) -> int -> unit

grow 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 -> unit

shrink 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!

  end

Default strategy

  module Default : sig
    type t = float * float * int

    val default : t
    val grow : t -> (int -> unit) -> int -> unit
    val shrink : t -> (int -> unit) -> int -> int -> unit
  end
end

Resizable parameterized array using the default reallocation strategy.

module Array : (Pres_intf.T with
 type Strategy.t = Strat.Default.t)

Resizable float array using the default reallocation strategy.

module Floats
  : (Nopres_intf.T with
 type Strategy.t = Strat.Default.t
 and
 type el = float)

Resizable bit vector using the default reallocation strategy.

module Bits
  : (Nopres_intf.T with
 type Strategy.t = Strat.Default.t
 and
 type el = bool)

Resizable weak array using the default reallocation strategy.

module Weak : (Weak_intf.T with
 type Strategy.t = Strat.Default.t)

Resizable buffer using the default reallocation strategy.

module Buffer
  : (Nopres_intf.Buffer
     with
 type Strategy.t = Strat.Default.t
 and
 type el = char)

Contains functors that build resizable datastructures from reallocation strategies.

module Make : sig

Functor that creates resizable parameterized arrays from reallocation strategies.

  module Array : functor (S : Strat.T) ->
    (Pres_intf.T with
 type Strategy.t = S.t)

Functor that creates resizable float arrays from reallocation strategies.

  module Floats : functor (S : Strat.T) ->
    (Nopres_intf.T with
 type Strategy.t = S.t
 and
 type el = float)

Functor that creates resizable bit vectors from reallocation strategies.

  module Bits : functor (S : Strat.T) ->
    (Nopres_intf.T with
 type Strategy.t = S.t
 and
 type el = bool)

Functor that creates resizable weak arrays from reallocation strategies.

  module Weak : functor (S : Strat.T) ->
    (Weak_intf.T with
 type Strategy.t = S.t)

Functor that creates resizable buffers (=string arrays) from reallocation strategies.

  module Buffer : functor (S : Strat.T) ->
    (Nopres_intf.Buffer with
 type Strategy.t = S.t
 and
 type el = char)
end


Go to the first, previous, next, last section, table of contents.