Module Core_set_intf

module Core_set_intf: sig .. end
This module defines interfaces used in Core.Std.Set. This module uses the same organizational approach as Core_map_intf. See the documentation in core_map.mli for a description of the approach.

val __pa_ounit_275876e34cf609db118f3d84b799a790 : string

This module defines interfaces used in Core.Std.Set. This module uses the same organizational approach as Core_map_intf. See the documentation in core_map.mli for a description of the approach.
module Binable: Binable0
module type Elt = Comparator.Pre
module type Elt_binable = Comparator.Pre_binable
module type Accessors = sig .. end
type ('key, 'comparator, 'z) without_comparator = ('key, 'comparator, 'z) Core_map_intf.without_comparator 
type ('key, 'comparator, 'z) with_comparator = ('key, 'comparator, 'z) Core_map_intf.with_comparator 
module type Creators = sig .. end
module type Creators_and_accessors = sig .. end
module type S = sig .. end
module type S_binable = sig .. end

This module defines interfaces used in Core.Std.Set. This module uses the same organizational approach as Core_map_intf. See the documentation in core_map.mli for a description of the approach.

Test if invariants of internal AVL search tree hold.

subset t1 t2 returns true iff t1 is a subset of t2.

if res = partition_tf set ~f then fst res are the elements on which f produced true, and snd res are the elements on which f produces false

split x set produces a triple triple where fst3 triple is the set of elements strictly less than x, snd3 triple = mem set x, and trd3 triple is the set of elements strictly larger than x.

if equiv is an equivalence predicate, then group_by set ~equiv produces a list of equivalence classes (i.e., a set-theoretic quotient). E.g.,

let chars = Set.of_list ['A'; 'a'; 'b'; 'c'] in let equiv c c' = Char.equal (Char.uppercase c) (Char.uppercase c') in group_by chars ~equiv

produces

Set.of_list['A';'a']; Set.singleton 'b'; Set.singleton 'c'

Runs in O(n^2) time.

find_index t i returns the ith smallest element of t in O(log n) time. The smallest element has i = 0.

Create set from sorted array. The input must be sorted (either in ascending or descending order as given by the comparator) and contain no duplicates, otherwise the result is an error. The complexity of this function is O(N).

Similar to of_sorted_arary without checking the input array.