diff --git a/sledge/lib/import/qset.ml b/sledge/lib/import/qset.ml index 11772e6a5..ba73cd028 100644 --- a/sledge/lib/import/qset.ml +++ b/sledge/lib/import/qset.ml @@ -71,6 +71,7 @@ struct M.fold m' ~init:m ~f:(fun ~key:x ~data:i m -> add m x i) let map_counts m ~f = M.mapi ~f:(fun ~key ~data -> f key data) m + let is_empty = M.is_empty let length m = M.length m let count m x = match M.find m x with Some q -> q | None -> Q.zero let choose = M.choose diff --git a/sledge/lib/import/qset_intf.ml b/sledge/lib/import/qset_intf.ml index 8c01787ad..f0c1d5fae 100644 --- a/sledge/lib/import/qset_intf.ml +++ b/sledge/lib/import/qset_intf.ml @@ -43,6 +43,8 @@ module type S = sig (* queries *) + val is_empty : t -> bool + val length : t -> int (** Number of elements with non-zero multiplicity. [O(1)]. *)