Module Kzg.SMap

type !+'a t
include Stdlib.Map.S with type 'a t := 'a t and type key := string
val empty : 'a t
val add : string -> 'a -> 'a t -> 'a t
val add_to_list : string -> 'a -> 'a list t -> 'a list t
val update : string -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : string -> 'a -> 'a t
val remove : string -> 'a t -> 'a t
val merge : (string -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (string -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (string * 'a) list
val min_binding : 'a t -> string * 'a
val min_binding_opt : 'a t -> (string * 'a) option
val max_binding : 'a t -> string * 'a
val max_binding_opt : 'a t -> (string * 'a) option
val choose : 'a t -> string * 'a
val choose_opt : 'a t -> (string * 'a) option
val find : string -> 'a t -> 'a
val find_opt : string -> 'a t -> 'a option
val find_first : (string -> bool) -> 'a t -> string * 'a
val find_first_opt : (string -> bool) -> 'a t -> (string * 'a) option
val find_last : (string -> bool) -> 'a t -> string * 'a
val find_last_opt : (string -> bool) -> 'a t -> (string * 'a) option
val iter : (string -> 'a -> unit) -> 'a t -> unit
val fold : (string -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (string -> 'a -> 'b) -> 'a t -> 'b t
val filter : (string -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (string -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (string -> 'a -> bool) -> 'a t -> 'a t * 'a t
val split : string -> 'a t -> 'a t * 'a option * 'a t
val is_empty : 'a t -> bool
val mem : string -> 'a t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all : (string -> 'a -> bool) -> 'a t -> bool
val exists : (string -> 'a -> bool) -> 'a t -> bool
val to_list : 'a t -> (string * 'a) list
val to_seq : 'a t -> (string * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (string * 'a) Stdlib.Seq.t
val to_seq_from : string -> 'a t -> (string * 'a) Stdlib.Seq.t
val add_seq : (string * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (string * 'a) Stdlib.Seq.t -> 'a t
val t : 'a Repr.ty -> 'a t Repr.ty
val of_list : (string * 'a) list -> 'a t
val keys : 'a t -> string list
val values : 'a t -> 'a list
val to_pair : ('a * 'b) t -> 'a t * 'b t
val add_unique : string -> 'a -> 'a t -> 'a t

add_unique k v map adds k -> v to map & throw an error if k is already in map

val union_disjoint : ?common_keys_equal_elt:(string list * ('a -> 'a -> bool)) -> 'a t -> 'a t -> 'a t

Return the union of two maps. The keys of the maps have to be disjoint unless specifically stated in common_keys. In this case both key's values are asserted to be equal, with a given equality function. If no equal function is given, the polymorphic equality is used.

val union_disjoint_list : ?common_keys_equal_elt:(string list * ('a -> 'a -> bool)) -> 'a t list -> 'a t

Applies union_disjoint on a list of maps

val map_list_to_list_map : 'a t list -> 'a list t

given a list of maps, outputs a single map with the union of all keys and containing lists which consist of the concatenation of the data elements under the same key (order is preserved)

val sub_map : 'a t -> 'b t -> 'b t

sub_map m1 m2 returns m2 without the keys that do not appear in m1. Raises failure if some key of m1 is not in m2

val update_keys : (string -> string) -> 'a t -> 'a t

USE WITH CAUTION : make sure your update function won’t create duplicates (only one will be kept)

module Aggregation : sig ... end

This module is used to handle proof aggregation in Plonk The format of keys for aggregation is <circuit~proof~key>