package jasmin
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e92b42fa69da7c730b0c26dacf842a72b4febcaf4f2157a1dc18b3cce1f859fa
doc/jasmin.jasmin/Jasmin/Utils/ISet/index.html
Module Utils.ISet
Source
include module type of BatISet
the underlying representation is a balanced tree of ranges
This kind of set only holds ints
add_range lo hi t
adds the range of integers lo, hi
(including both endpoints) to the given set, returning a new set
remove_range lo hi t
removes a range of elements from the given set, returning a new set
Compute the union of two sets. This is the set whose elements are those elements in either input set.
Compute the intersection of two sets. This is the set whose elements are those in *both* of the input sets.
Compute the difference between two sets. This is the set of elements that are in the first but not in the second. Unlike union
and inter
, order matters here.
Create the complement of the given set - i.e. the set of all values not in the input set.
Compare two sets. It is not safe to use the polymorphic (<) and related functions to compare these sets, as the tree representation used can balance in multiple ways.
Test whether two sets are equal. It is not safe to use the polymorphic (=) on these sets, as the same set can have multiple representations depending on how it was built.
Same as compare
but returns BatOrd.Lt | BatOrd.Eq | BatOrd.Gt
instead of an int.
iter_range f t
calls f
once for each contiguous range of t
. The contiguous ranges of a set are sequences of adjacent integers all part of the set.
fold f t x0
returns the final result of merging each element of t
into x0
using merge function f
As fold, but operates on contiguous ranges
Tests whether a predicate applies to all elements of the set
Test whether some element of a set satisfies a predicate
Builds the subset of those elements that satisfy the predicate
partitions the input set into two sets with elements that satisfy the predicate and those that don't