jon.recoil.org

Module Bounded_index.MakeSource

Parameters

module M : sig ... end

Signature

type t
include Ppx_hash_lib.Hashable.S_any with type t := t
include Core.Identifiable.S__local__portable with type t := t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_size_t__local : t Bin_prot.Size.sizer__local
val bin_write_t__local : t Bin_prot.Write.writer__local
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : t Bin_prot.Read.vtag_reader
val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val of_string : string -> t
val to_string : t -> string
val pp : Base.Formatter.t -> t -> unit
val (>=) : t -> t -> bool @@ portable
val (<=) : t -> t -> bool @@ portable
val (=) : t -> t -> bool @@ portable
val (>) : t -> t -> bool @@ portable
val (<) : t -> t -> bool @@ portable
val (<>) : t -> t -> bool @@ portable
val equal : t -> t -> bool @@ portable
val compare : t -> t -> int @@ portable
val equal__local : t @ local -> t @ local -> bool @@ portable
val compare__local : t @ local -> t @ local -> int @@ portable
val min : t -> t -> t @@ portable
val max : t -> t -> t @@ portable
val ascending : t -> t -> int @@ portable
val descending : t -> t -> int @@ portable
val between : t -> low:t -> high:t -> bool @@ portable
val clamp_exn : t -> min:t -> max:t -> t @@ portable
val clamp : t -> min:t -> max:t -> t Base.Or_error.t @@ portable
type comparator_witness
val validate_lbound : min:t Core.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core.Maybe_bound.t -> t Validate.check
val validate_bound : min:t Core.Maybe_bound.t -> max:t Core.Maybe_bound.t -> t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
val hash_fold_t : t Ppx_hash_lib.hash_fold
val hashable : t Base.Hashable.t
module Table : sig ... end
module Hash_set : sig ... end
module Hash_queue : sig ... end
val create : Base.Int.t -> min:Base.Int.t -> max:Base.Int.t -> t @@ portable

create index ~min ~max raises if index < min || index > max. The resulting t is only equal to other t if all three fields are the same.

val create_all : min:Base.Int.t -> max:Base.Int.t -> t Base.List.t @@ portable

all indices in ascending order

Accessors.

val zero_based_index : t -> Base.Int.t @@ portable

zero_based_index t is the function that code consuming a t most likely wants to call. It is simply index t - min_index t, meaning it returns an index i such that 0 <= i <= (max_index t - min_index t).

val index : t -> Base.Int.t @@ portable

index t returns the index t was created with, i.e. a number between min_index t and max_index t.

val min_index : t -> Base.Int.t @@ portable
val max_index : t -> Base.Int.t @@ portable
val num_indexes : t -> Base.Int.t @@ portable

num_indexes t returns the number of valid indexes in the range. Equal to max_index t - min_index t + 1

module Stable : sig ... end