package acgtk

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

A resumption store module for the weighting scheme being used

type 'a resumptions

The type of the resumption store

type 'a computation

The type of the computation, 'a being the type of the computational state to be stored

type w

The type of the weight of the computational states

val empty : alt_max:int -> 'a resumptions

empty ~alt_max returns an empty resumption store. alt_max defines the maximal number of states to be stored while keeping sorted according to w.

val regular_sorting : 'a resumptions -> bool

regular_sorting r returns true if r still uses regular sorting and false otherwise.

val is_empty : 'a resumptions -> bool

is_empty r returns true if r contains no computational states.

val extend_resumptions : computation:'a computation -> weight:w -> 'a resumptions -> 'a resumptions

extend_resumptions ~computation ~weight r returns r to which the computational state computation with weight weight was added.

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

pp fmt r pretty prints the resumption store r on the formatter fmt.

val swap : ?current_computation:('a computation * w) -> 'a resumptions -> 'a computation * w * 'a resumptions

swap ~current_computation r returns (c,w,r') where r' is r to which current_computation was added and c, whose weight is w, was removed. If r is such that regular sorting is disabled, r' is r and (c,w) is current_computation.

OCaml

Innovation. Community. Security.