package codex

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Interval_map.With_ExtractSource

This associates value to an interval, but splitting (or concatenating) interval affects the value they contain.

Parameters

module Value : sig ... end

Signature

Sourcetype t
Sourceval create : size:int -> Value.t -> t
Sourceval get_size : t -> int
Sourceval iter_between : size:int -> key -> t -> extract:(Value.t -> idx:int -> size:int -> oldsize:int -> 'extracted) -> (size:int -> key -> 'extracted -> unit) -> unit
Sourceval fold_between : size:int -> key -> t -> extract:(Value.t -> idx:int -> size:int -> oldsize:int -> 'extracted) -> 'b -> (size:int -> key -> 'extracted -> 'b -> 'b) -> 'b
Sourceval store : size:int -> key -> t -> Value.t -> t
Sourceval fold_on_diff : t -> t -> 'a -> extracta:(Value.t -> idx:int -> size:int -> oldsize:int -> 'extracted) -> extractb:(Value.t -> idx:int -> size:int -> oldsize:int -> 'extracted) -> (size:int -> key -> 'extracted -> 'extracted -> 'a -> 'a) -> 'a

Guarantees that we call the function only on values that are not equal.

Sourceval fold_on_diff3 : t -> t -> t -> 'a -> extract:(Value.t -> idx:int -> size:int -> oldsize:int -> 'extracted) -> (size:int -> key -> 'extracted -> 'extracted -> 'extracted -> 'a -> 'a) -> 'a
Sourceval subst_between : key -> size:int -> t -> extract:(Value.t -> idx:int -> size:int -> oldsize:int -> Value.t) -> (size:int -> key -> Value.t -> Value.t) -> t

Call subst on every interval in [key,key+size-1]. Preserve physical equality when feasible.