package incr_map
Helpers for incremental operations on map like data structures
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=91acc784e4760af8544c4504bee1a9f6d7385eb0620f8e56392cd193a250b7d2
doc/src/incr_map.collate/collated_intf.ml.html
Source file collated_intf.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
open Core module Which_range = Collate.Which_range module type Parametrized = 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 [@@deriving sexp, bin_io, compare, equal, diff] val empty : _ t val fold : ('k, 'v) t -> init:'accum -> f:('accum -> 'k * 'v -> 'accum) -> 'accum val iter : ('k, 'v) t -> f:('k * 'v -> unit) -> unit val to_alist : ('k, 'v) t -> ('k * 'v) list val to_opaque_map : ('k, 'v) t -> ('k * 'v) Opaque_map.t val first : ('k, 'v) t -> ('k * 'v) option val last : ('k, 'v) t -> ('k * 'v) option val mapi : ('k, 'v1) t -> f:('k -> 'v1 -> 'v2) -> ('k, 'v2) t val length : _ t -> int (** Total number of rows before filtering *) val num_unfiltered_rows : _ t -> int (** Total number of rows after filtering, but before limiting to range. *) val num_filtered_rows : _ t -> int (** Total number of rows that preceed the rank-range and key-range ranges. *) val num_before_range : _ t -> int (** Total number of rows that follow the rank-range and key-range ranges. *) val num_after_range : _ t -> int (** The key range this result was computed for *) val key_range : ('k, _) t -> 'k Which_range.t (** The rank range this result was computed for *) val rank_range : _ t -> int Which_range.t module Stable : sig module V1 : sig type nonrec ('k, 'v) t = ('k, 'v) t [@@deriving sexp, bin_io, stable_witness] include Diffable.S2 with type ('k, 'v) t := ('k, 'v) t end end module Private : sig val create : data:('k * 'v) Opaque_map.t -> num_filtered_rows:int -> key_range:'k Which_range.t -> rank_range:int Which_range.t -> num_before_range:int -> num_unfiltered_rows:int -> ('k, 'v) t end module For_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 *) val of_list : num_filtered_rows:int -> key_range:'k Which_range.t -> rank_range:int Which_range.t -> num_before_range:int -> num_unfiltered_rows:int -> ('k * 'v) list -> ('k, 'v) t end end module type Bin_comp_sexp = sig type t [@@deriving bin_io, sexp, compare, equal] end module type Concrete = sig module Key : Bin_comp_sexp module Value : Bin_comp_sexp type ('k, 'v) parametrized type t = (Key.t, Value.t) parametrized [@@deriving sexp, bin_io, compare, equal] val empty : t val fold : t -> init:'accum -> f:('accum -> Key.t * Value.t -> 'accum) -> 'accum val iter : t -> f:(Key.t * Value.t -> unit) -> unit val to_alist : t -> (Key.t * Value.t) list val to_opaque_map : t -> (Key.t * Value.t) Opaque_map.t val first : t -> (Key.t * Value.t) option val last : t -> (Key.t * Value.t) option val length : t -> int val num_filtered_rows : t -> int val num_unfiltered_rows : t -> int val key_range : t -> Key.t Which_range.t val rank_range : t -> int Which_range.t include Legacy_diffable.S with type t := t include Streamable.S with type t := t (** This strange value just encodes the fact that this type does not yet implement [Ldiffable.S]. When it does, delete this and then the compiler will show you places to update. *) val this_type_does_not_support_ldiffable : unit val find_by_key : t -> Key.t -> Value.t option val prev : t -> Key.t -> (Key.t * Value.t) option val next : t -> Key.t -> (Key.t * Value.t) option end module type Collated = sig include Parametrized module type Concrete = Concrete with type ('k, 'v) parametrized = ('k, 'v) t module Make_concrete (Key : Bin_comp_sexp) (Value : Bin_comp_sexp) : Concrete with type Key.t = Key.t and type Value.t = Value.t end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>