Module Set.Tree
type ('elt, 'cmp) t= ('elt, 'cmp) Core_kernel.Set_intf.Tree.tA
Tree.tcontains just the tree data structure that a set is based on, without including the comparator. Accordingly, any operation on aTree.tmust also take as an argument the corresponding comparator.
val sexp_of_t : ('elt -> Ppx_sexp_conv_lib.Sexp.t) -> ('cmp -> Ppx_sexp_conv_lib.Sexp.t) -> ('elt, 'cmp) t -> Ppx_sexp_conv_lib.Sexp.t
module Named = Core_kernel.Set_intf.Tree.Namedinclude Core_kernel.Set_intf.Creators_and_accessors2_with_comparator with type ('a, 'b) set := ('a, 'b) t with type ('a, 'b) t := ('a, 'b) t with type ('a, 'b) tree := ('a, 'b) t with type ('a, 'b) named := ('a, 'b) Named.t with module Named := Named
include Core_kernel.Set_intf.Accessors2_with_comparator
include Core_kernel.Set_intf.Set.Accessors2_with_comparator
val length : ('a, 'b) t -> intval is_empty : ('a, 'b) t -> boolval iter : ('a, 'b) t -> f:('a -> unit) -> unitval fold : ('a, 'b) t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accumval fold_result : ('a, 'b) t -> init:'accum -> f:('accum -> 'a -> ('accum, 'e) Base.Result.t) -> ('accum, 'e) Base.Result.tval exists : ('a, 'b) t -> f:('a -> bool) -> boolval for_all : ('a, 'b) t -> f:('a -> bool) -> boolval count : ('a, 'b) t -> f:('a -> bool) -> intval sum : (module Base__.Container_intf.Summable with type t = 'sum) -> ('a, 'b) t -> f:('a -> 'sum) -> 'sumval find : ('a, 'b) t -> f:('a -> bool) -> 'a optionval find_map : ('a, 'c) t -> f:('a -> 'b option) -> 'b optionval to_list : ('a, 'b) t -> 'a listval to_array : ('a, 'b) t -> 'a array
val invariants : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> boolval mem : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> 'a -> boolval add : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> 'a -> ('a, 'cmp) tval remove : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> 'a -> ('a, 'cmp) tval union : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) tval inter : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) tval diff : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) tval symmetric_diff : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'a) Base.Either.t Base.Sequence.tval compare_direct : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> intval equal : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> boolval is_subset : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> of_:('a, 'cmp) t -> bool
module Named : sig ... endval fold_until : ('a, 'b) t -> init:'accum -> f:('accum -> 'a -> ('accum, 'final) Base__.Set_intf.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'finalval fold_right : ('a, 'b) t -> init:'accum -> f:('a -> 'accum -> 'accum) -> 'accumval iter2 : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t -> f:([ `Both of 'a * 'a | `Left of 'a | `Right of 'a ] -> unit) -> unitval filter : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> f:('a -> bool) -> ('a, 'cmp) tval partition_tf : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> f:('a -> bool) -> ('a, 'cmp) t * ('a, 'cmp) tval elements : ('a, 'b) t -> 'a listval min_elt : ('a, 'b) t -> 'a optionval min_elt_exn : ('a, 'b) t -> 'aval max_elt : ('a, 'b) t -> 'a optionval max_elt_exn : ('a, 'b) t -> 'aval choose : ('a, 'b) t -> 'a optionval choose_exn : ('a, 'b) t -> 'aval split : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> 'a -> ('a, 'cmp) t * 'a option * ('a, 'cmp) tval group_by : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> equiv:('a -> 'a -> bool) -> ('a, 'cmp) t listval find_exn : ('a, 'b) t -> f:('a -> bool) -> 'aval nth : ('a, 'b) t -> int -> 'a optionval remove_index : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> int -> ('a, 'cmp) tval to_tree : ('a, 'cmp) t -> ('a, 'cmp) treeval to_sequence : comparator:('a, 'cmp) Base.Comparator.t -> ?order:[ `Decreasing | `Increasing ] -> ?greater_or_equal_to:'a -> ?less_or_equal_to:'a -> ('a, 'cmp) t -> 'a Base.Sequence.tval binary_search : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> compare:('a -> 'key -> int) -> [ `First_equal_to | `First_greater_than_or_equal_to | `First_strictly_greater_than | `Last_equal_to | `Last_less_than_or_equal_to | `Last_strictly_less_than ] -> 'key -> 'a optionval binary_search_segmented : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t -> segment_of:('a -> [ `Left | `Right ]) -> [ `First_on_right | `Last_on_left ] -> 'a optionval merge_to_sequence : comparator:('a, 'cmp) Base.Comparator.t -> ?order:[ `Decreasing | `Increasing ] -> ?greater_or_equal_to:'a -> ?less_or_equal_to:'a -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'a) Base__.Set_intf.Merge_to_sequence_element.t Base.Sequence.t
val to_map : comparator:('a, 'cmp) Core_kernel.Comparator.t -> ('a, 'cmp) t -> f:('a -> 'b) -> ('a, 'b, 'cmp) Base.Map.tval quickcheck_observer : 'a Core_kernel.Quickcheck.Observer.t -> ('a, 'cmp) t Core_kernel.Quickcheck.Observer.tval quickcheck_shrinker : comparator:('a, 'cmp) Core_kernel.Comparator.t -> 'a Core_kernel.Quickcheck.Shrinker.t -> ('a, 'cmp) t Core_kernel.Quickcheck.Shrinker.t
include Core_kernel.Set_intf.Creators2_with_comparator with type ('a, 'b) t := ('a, 'b) t with type ('a, 'b) tree := ('a, 'b) tree
include Core_kernel.Set_intf.Set.Creators2_with_comparator
val empty : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) tval singleton : comparator:('a, 'cmp) Base.Comparator.t -> 'a -> ('a, 'cmp) tval union_list : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) t list -> ('a, 'cmp) tval of_list : comparator:('a, 'cmp) Base.Comparator.t -> 'a list -> ('a, 'cmp) tval of_array : comparator:('a, 'cmp) Base.Comparator.t -> 'a array -> ('a, 'cmp) tval of_sorted_array : comparator:('a, 'cmp) Base.Comparator.t -> 'a array -> ('a, 'cmp) t Base.Or_error.tval of_sorted_array_unchecked : comparator:('a, 'cmp) Base.Comparator.t -> 'a array -> ('a, 'cmp) tval of_increasing_iterator_unchecked : comparator:('a, 'cmp) Base.Comparator.t -> len:int -> f:(int -> 'a) -> ('a, 'cmp) tval stable_dedup_list : comparator:('a, 'cmp) Base.Comparator.t -> 'a list -> 'a listval map : comparator:('b, 'cmp) Base.Comparator.t -> ('a, 'c) set -> f:('a -> 'b) -> ('b, 'cmp) tval filter_map : comparator:('b, 'cmp) Base.Comparator.t -> ('a, 'c) set -> f:('a -> 'b option) -> ('b, 'cmp) tval of_tree : comparator:('a, 'cmp) Base.Comparator.t -> ('a, 'cmp) tree -> ('a, 'cmp) t
val of_hash_set : comparator:('a, 'cmp) Core_kernel.Comparator.t -> 'a Core_kernel.Hash_set.t -> ('a, 'cmp) tval of_hashtbl_keys : comparator:('a, 'cmp) Core_kernel.Comparator.t -> ('a, _) Core_kernel.Hashtbl.t -> ('a, 'cmp) tval of_map_keys : ('a, _, 'cmp) Base.Map.t -> ('a, 'cmp) tval quickcheck_generator : comparator:('a, 'cmp) Core_kernel.Comparator.t -> 'a Core_kernel.Quickcheck.Generator.t -> ('a, 'cmp) t Core_kernel.Quickcheck.Generator.t