package alt-ergo-lib

  1. Overview
  2. Docs
On This Page
  1. Integer heaps
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module AltErgoLib.IheapSource

Integer heaps

This modules define priority heaps over integers.

Integer heaps

Sourcetype t

The type of heaps.

Sourceval init : int -> t

Create a heap with the given initial size.

Sourceval in_heap : t -> int -> bool

Heap membership function.

Sourceval decrease : (int -> int -> bool) -> t -> int -> unit

Decrease activity of the given integer. TODO: document the comparison function !

Sourceval increase : (int -> int -> bool) -> t -> int -> unit

Increase activity of the given integer. TODO: document the comparison function !

Sourceval size : t -> int

Returns the current size of the heap.

Sourceval is_empty : t -> bool

Is the heap empty ?

Sourceval insert : (int -> int -> bool) -> t -> int -> unit

Inset a new element in the heap. TODO: document comparison function.

Sourceval grow_to_by_double : t -> int -> unit

Grow the size of the heap by multiplying it by 2 until it is at least the size specified.

Sourceval remove_min : (int -> int -> bool) -> t -> int

Remove the minimum element from the heap and return it.

Sourceval filter : t -> (int -> bool) -> (int -> int -> bool) -> unit

Filter elements in the heap. TODO: document comparison function !

OCaml

Innovation. Community. Security.