package lrgrep
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=84a1874d0c063da371e19c84243aac7c40bfcb9aaf204251e0eb0d1f077f2cde
sha512=5a16ff42a196fd741bc64a1bdd45b4dca0098633e73aa665829a44625ec15382891c3643fa210dbe3704336eab095d4024e093e37ae5313810f6754de6119d55
doc/utils/Utils/Refine/module-type-DECOMPOSABLE/index.html
Module type Refine.DECOMPOSABLESource
val is_empty : 'a t -> boolis_empty s determines whether the set s is empty.
compare_minimum s1 s2 compares the nonempty sets s1 and s2 based on their minimum elements.
sorted_union ss computes the union of all sets in the list ss. Every set in the list ss must be nonempty. The intervals that underlie these sets must be ordered and nonoverlapping: that is, if s1 and s2 are two adjacent sets in the list ss, then they must satisfy the condition maximum s1 < minimum s2.
extract_unique_prefix s1 s2 requires compare_minimum s1 s2 < 0, that is, minimum s1 < minimum s2. It splits s1 in two disjoint subsets head1 and tail1 such that head1 is exactly the subset of s1 whose elements are less than minimum s2. Therefore, head1 must be nonempty, whereas tail1 may be empty.
extract_shared_prefix s1 s2 requires compare_minimum s1 s2 = 0, that is, minimum s1 = minimum s2. It splits s1 and s2 into three subsets head, tail1, and tail2, as follows:
s1ishead U tail1ands2ishead U tail2. This implies thatheadis a subset of boths1ands2.- An element in
headis smaller than every element intail1andtail2. headis maximal with respect to the previous two properties.
In summary, head is the maximal shared prefix of the sets s1 and s2.