Module Bounded_index.MakeSource
Parameters
module M : sig ... endSignature
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.sizerval bin_write_t : t Bin_prot.Write.writerval bin_size_t__local : t Bin_prot.Size.sizer__localval bin_write_t__local : t Bin_prot.Write.writer__localval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : t Bin_prot.Read.vtag_readerval bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tval t_of_sexp : Sexplib0.Sexp.t -> tval sexp_of_t : t -> Sexplib0.Sexp.tval of_string : string -> tval to_string : t -> stringval pp : Base.Formatter.t -> t -> unitval clamp : t -> min:t -> max:t -> t Base.Or_error.t @@ portableval validate_lbound : min:t Core.Maybe_bound.t -> t Validate.checkval validate_ubound : max:t Core.Maybe_bound.t -> t Validate.checkval validate_bound :
min:t Core.Maybe_bound.t ->
max:t Core.Maybe_bound.t ->
t Validate.checkmodule Replace_polymorphic_compare : sig ... endval comparator : (t, comparator_witness) Base.Comparator.T.comparatormodule Map : sig ... endmodule Set : sig ... endval hash_fold_t : t Ppx_hash_lib.hash_foldval hash : t -> Ppx_hash_lib.Std.Hash.hash_valueval hashable : t Base.Hashable.tmodule Table : sig ... endmodule Hash_set : sig ... endmodule Hash_queue : sig ... endval create : Base.Int.t -> min:Base.Int.t -> max:Base.Int.t -> t @@ portablecreate 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 @@ portableall indices in ascending order
Accessors.
val zero_based_index : t -> Base.Int.t @@ portablezero_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 @@ portableindex 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 @@ portableval max_index : t -> Base.Int.t @@ portableval num_indexes : t -> Base.Int.t @@ portablenum_indexes t returns the number of valid indexes in the range. Equal to max_index t - min_index t + 1
module Stable : sig ... end