package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

doc/octez-shell-libs.shell/Tezos_shell/Prevalidator_classification/Sized_map/index.html

Module Prevalidator_classification.Sized_mapSource

This module implements a sized-map data-structure.

This module has the same interface as Stdlib.Map but with a different performance trade-off:

The cardinal function is much more efficient, but all other functions are a little bit slower. You should use this module if you need to call the cardinal function often. You should stick to Stdlib.Map otherwise.

All the types and functions from the underlying Maps are supported.

The functions merge and union are less efficient than TzLwtreslib.Map.S.merge and TzLwtreslib.Map.S.union which should be considered instead, especially in case there are called several times. to_map and of_map can be used for this purpose.

include Tezos_error_monad.TzLwtreslib.Map.S with type key = Tezos_base.TzPervasives.Operation_hash.t
Sourcetype key = Tezos_base.TzPervasives.Operation_hash.t
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 update : key -> ('a option -> 'a option) -> 'a t -> 'a t
Sourceval singleton : key -> 'a -> 'a t
Sourceval remove : key -> 'a t -> 'a t
Sourceval merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
Sourceval union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
Sourceval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
Sourceval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
Sourceval iter : (key -> 'a -> unit) -> 'a t -> unit
Sourceval iter_e : (key -> 'a -> (unit, 'trace) result) -> 'a t -> (unit, 'trace) result
Sourceval iter_s : (key -> 'a -> unit Lwt.t) -> 'a t -> unit Lwt.t
Sourceval iter_p : (key -> 'a -> unit Lwt.t) -> 'a t -> unit Lwt.t
Sourceval iter_es : (key -> 'a -> (unit, 'trace) result Lwt.t) -> 'a t -> (unit, 'trace) result Lwt.t
Sourceval fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
Sourceval fold_e : (key -> 'a -> 'b -> ('b, 'trace) result) -> 'a t -> 'b -> ('b, 'trace) result
Sourceval fold_s : (key -> 'a -> 'b -> 'b Lwt.t) -> 'a t -> 'b -> 'b Lwt.t
Sourceval fold_es : (key -> 'a -> 'b -> ('b, 'trace) result Lwt.t) -> 'a t -> 'b -> ('b, 'trace) result Lwt.t
Sourceval for_all : (key -> 'a -> bool) -> 'a t -> bool
Sourceval exists : (key -> 'a -> bool) -> 'a t -> bool
Sourceval filter : (key -> 'a -> bool) -> 'a t -> 'a t
Sourceval filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
Sourceval partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
Sourceval cardinal : 'a t -> int
Sourceval bindings : 'a t -> (key * 'a) list
Sourceval min_binding : 'a t -> (key * 'a) option
Sourceval min_binding_opt : 'a t -> (key * 'a) option
Sourceval max_binding : 'a t -> (key * 'a) option
Sourceval max_binding_opt : 'a t -> (key * 'a) option
Sourceval choose : 'a t -> (key * 'a) option
Sourceval choose_opt : 'a t -> (key * 'a) option
Sourceval split : key -> 'a t -> 'a t * 'a option * 'a t
Sourceval find : key -> 'a t -> 'a option
Sourceval find_opt : key -> 'a t -> 'a option
Sourceval find_first : (key -> bool) -> 'a t -> (key * 'a) option
Sourceval find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
Sourceval find_last : (key -> bool) -> 'a t -> (key * 'a) option
Sourceval find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
Sourceval map : ('a -> 'b) -> 'a t -> 'b t
Sourceval mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
Sourceval to_seq : 'a t -> (key * 'a) Seq.t
Sourceval to_rev_seq : 'a t -> (key * 'a) Seq.t
Sourceval to_seq_from : key -> 'a t -> (key * 'a) Seq.t
Sourceval add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
Sourceval of_seq : (key * 'a) Seq.t -> 'a t
Sourceval iter_ep : (key -> 'a -> (unit, 'error Tezos_error_monad.TzTrace.trace) result Lwt.t) -> 'a t -> (unit, 'error Tezos_error_monad.TzTrace.trace) result Lwt.t
Sourceval to_map : 'a t -> 'a Tezos_base.TzPervasives.Operation_hash.Map.t

to_map t returns the map of the sizedmap t

Sourceval of_map : 'a Tezos_base.TzPervasives.Operation_hash.Map.t -> 'a t

of_map m returns the sizedmap of the map m

OCaml

Innovation. Community. Security.