package pomap

  1. Overview
  2. Docs

Index module used to index elements in the store

type t

Type of indices

type gen

Type of index generators

module Set : Set.S with type elt = t

Efficient sets of indices

module Map : Map.S with type key = t

Efficient maps of indices

val start : gen

The start state of the index generator

val next_ix : gen -> t

next_ix gen

  • returns

    the next index that generator gen will produce.

val next : gen -> t * gen

next gen

  • returns

    the tuple of (new_ix, new_gen), where new_ix is the next index and new_gen the next state of the index generator.

val remove_ix : gen -> t -> gen

remove_ix gen ix

  • returns

    an updated index generator which is guaranteed to never return index ix or any other previously returned index.

val int_of_ix : t -> int

int_of_ix ix converts index ix to an integer.

  • raises Failure

    if index out of range for machine integers.