package acgtk

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

This module implements a map from weights to lists of computational states of same weight.

type 'a t

The type of the map

val empty : 'a t

empty returns the empty map

val optimum : 'a t -> w option

optimum m returns None if m is empty and Some w if w is the best weight of the current computations stored in the map m.

val pp : Format.formatter -> 'a t -> unit

pp fmt m pretty prints (a summary of) the map m on the formatter fmt.

val add : w -> 'a -> 'a t -> 'a t

add w e m returns m where e was added with weight w.

val pop_optimum : 'a t -> ('a * w * 'a t) option

pop_optimum m returns None if m is empty and Some (c, w, m') where w is the best weight of the current computations stored in the map m, c is a computation with this weight, and m' is m where c was removed.

OCaml

Innovation. Community. Security.