package fast_bitvector

  1. Overview
  2. Docs

Module Fast_bitvector.SetSource

Sourceval mem : t -> int -> bool

mem v i checks whenever the bit with offset i is set to one.

Sourceval inter : t -> t -> dst:t -> unit

inter x y returns the elements that are in both x and y

Sourceval complement : t -> dst:t -> unit

complement x returns bitwise negation of x

Sourceval symmetric_diff : t -> t -> dst:t -> unit

symmetric_diff x y returns the elements that are in x or y but not both.

Sourceval diff : t -> t -> dst:t -> unit

diff x y returns the elements in x that are not in y

Sourceval union : t -> t -> dst:t -> unit

union x y returns the elements that are in x or y

Sourceval are_disjoint : t -> t -> bool

Test if two sets are disjoint.

Sourceval is_subset : of_:t -> t -> bool

subset s1 ~of_ tests whether the bitvector s1 is a subset of the bitvector of_.

Sourceval cardinality : t -> int

The number of elements in the set