package coq-core

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

Module Int.PMapSource

This is a (partial) implementation of a Map interface on integers, except that it internally uses persistent arrays. This ensures O(1) accesses in non-backtracking cases. It is thus better suited for zero-starting, contiguous keys, or otherwise a lot of space will be empty. To keep track of the present keys, a binary tree is also used, so that adding a key is still logarithmic. It is therefore essential that most of the operations are accesses and not add/removes.

Sourcetype key = int
Sourcetype 'a t
Sourceval empty : 'a t
Sourceval is_empty : 'a t -> bool
Sourceval mem : key -> 'a t -> bool
Sourceval add : key -> 'a -> 'a t -> 'a t
Sourceval singleton : key -> 'a -> 'a t
Sourceval remove : key -> 'a t -> 'a t
Sourceval iter : (key -> 'a -> unit) -> 'a t -> unit
Sourceval fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
Sourceval for_all : (key -> 'a -> bool) -> 'a t -> bool
Sourceval exists : (key -> 'a -> bool) -> 'a t -> bool
Sourceval find : key -> 'a t -> 'a
Sourceval domain : 'a t -> Set.t
Sourceval cast : 'a t -> 'a Map.t
OCaml

Innovation. Community. Security.