Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file collated_intf.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108openCoremoduleWhich_range=Collate.Which_rangemoduleMap_list=Incr_map_erase_keymoduletypeParametrized=sig(** The result of collation - a filtered, sorted and restricted-to-a-range list of keys
and values. The underlying data structure is a bit more sophisticated than a list,
to provide better diffing.
To get an implementation of [Diffable] interface, you'll need to instantiate
[Make_concrete].
*)type('k,'v)t[@@derivingsexp,bin_io,compare,equal]valempty:_tvalfold:('k,'v)t->init:'accum->f:('accum->'k*'v->'accum)->'accumvaliter:('k,'v)t->f:('k*'v->unit)->unitvalto_alist:('k,'v)t->('k*'v)listvalto_map_list:('k,'v)t->('k*'v)Map_list.tvalfirst:('k,'v)t->('k*'v)optionvallast:('k,'v)t->('k*'v)optionvalmapi:('k,'v1)t->f:('k->'v1->'v2)->('k,'v2)tvallength:_t->int(** Total number of rows before filtering *)valnum_unfiltered_rows:_t->int(** Total number of rows after filtering, but before limiting to range. *)valnum_filtered_rows:_t->int(** Total number of rows that preceed the rank-range and key-range ranges. *)valnum_before_range:_t->int(** Total number of rows that follow the rank-range and key-range ranges. *)valnum_after_range:_t->int(** The key range this result was computed for *)valkey_range:('k,_)t->'kWhich_range.t(** The rank range this result was computed for *)valrank_range:_t->intWhich_range.tmodulePrivate:sigvalcreate:data:('k*'v)Map_list.t->num_filtered_rows:int->key_range:'kWhich_range.t->rank_range:intWhich_range.t->num_before_range:int->num_unfiltered_rows:int->('k,'v)tendmoduleFor_testing:sig(** Create Collated.t of a list of data. Note: no collation or checks are performed,
it will contain exactly the data you provided *)valof_list:num_filtered_rows:int->key_range:'kWhich_range.t->rank_range:intWhich_range.t->num_before_range:int->num_unfiltered_rows:int->('k*'v)list->('k,'v)tendendmoduletypeBin_comp_sexp=sigtypet[@@derivingbin_io,sexp,compare,equal]endmoduletypeConcrete=sigmoduleKey:Bin_comp_sexpmoduleValue:Bin_comp_sexptype('k,'v)parametrizedtypet=(Key.t,Value.t)parametrized[@@derivingsexp,bin_io,compare,equal]valempty:tvalfold:t->init:'accum->f:('accum->Key.t*Value.t->'accum)->'accumvaliter:t->f:(Key.t*Value.t->unit)->unitvalto_alist:t->(Key.t*Value.t)listvalto_map_list:t->(Key.t*Value.t)Map_list.tvalfirst:t->(Key.t*Value.t)optionvallast:t->(Key.t*Value.t)optionvallength:t->intvalnum_filtered_rows:t->intvalnum_unfiltered_rows:t->intvalkey_range:t->Key.tWhich_range.tvalrank_range:t->intWhich_range.tincludeDiffable.Swithtypet:=tincludeStreamable.Swithtypet:=tvalfind_by_key:t->Key.t->Value.toptionvalprev:t->Key.t->(Key.t*Value.t)optionvalnext:t->Key.t->(Key.t*Value.t)optionendmoduletypeCollated=sigincludeParametrizedmoduletypeConcrete=Concretewithtype('k,'v)parametrized=('k,'v)tmoduleMake_concrete(Key:Bin_comp_sexp)(Value:Bin_comp_sexp):ConcretewithtypeKey.t=Key.tandtypeValue.t=Value.tend