From d4a9b0a8d19d953c34cace42283723ec90994bf8 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 6 Aug 2018 11:52:01 -0500 Subject: [PATCH] prepare for 2.3 --- CHANGELOG.adoc | 15 +++++++++++++++ containers.opam | 2 +- src/core/CCList.mli | 10 +++++----- src/core/CCListLabels.mli | 10 +++++----- src/core/CCVector.mli | 4 ++-- src/data/CCIntMap.mli | 8 ++++---- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 567fe8aeb..9db37954a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,20 @@ = Changelog +== 2.3 + +- feat(vector): add `Vector.{filter,filter_map}_in_place` +- perf(hashtrie): use int64 for 64-bits branching factor and popcount +- feat(intmap): add `CCIntMap.{filter,filter_map,merge,is_empty}` +- Add `CCHeap.Make_from_compare` (#225) +- add relational ops `CCList.{group_by,join,join_by,join_all_by,group_join_by}` + +- fix(float): make `Float.{min,max}` compliant with revised IEEE754 +- fix(build): remove `[@inline]` attributes since they break on 4.02.3 +- Fix Int32 and Int64 operators that are not visible (#224) + +- some performance tweaks in Vector +- test(float): add some tests for FP min/max + == 2.2 - Improving comments presentation diff --git a/containers.opam b/containers.opam index 6372693d6..5dd1c72a6 100644 --- a/containers.opam +++ b/containers.opam @@ -1,6 +1,6 @@ opam-version: "1.2" name: "containers" -version: "2.2" +version: "2.3" author: "Simon Cruanes" maintainer: "simon.cruanes.2007@m4x.org" build: [ diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 5e32522a1..53aaa34af 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -178,14 +178,14 @@ val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t (** Group equal elements, regardless of their order of appearance. precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t (** [join ~join_row a b] combines every element of [a] with every element of [b] using [join_row]. If [join_row] returns None, then the two elements do not combine. Assume that [b] allows for multiple iterations. - @since NEXT_RELEASE *) + @since 2.3 *) val join_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> @@ -200,7 +200,7 @@ val join_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> using [merge]. If [merge] returns [None], the combination of values is discarded. precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val join_all_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> @@ -217,7 +217,7 @@ val join_all_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> - call [merge k l1 l2]. If [merge] returns [None], the combination of values is discarded, otherwise it returns [Some c] and [c] is inserted in the result. - @since NEXT_RELEASE *) + @since 2.3 *) val group_join_by : ?eq:('a -> 'a -> bool) -> ?hash:('a -> int) -> ('b -> 'a) -> @@ -230,7 +230,7 @@ val group_join_by : ?eq:('a -> 'a -> bool) -> ?hash:('a -> int) -> sequences without corresponding values in the second one are mapped to [[]] precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val sublists_of_len : ?last:('a list -> 'a list option) -> diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index 1d28e439a..ff9deb910 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -144,14 +144,14 @@ val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t (** Group equal elements, regardless of their order of appearance. precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t (** [join ~join_row a b] combines every element of [a] with every element of [b] using [join_row]. If [join_row] returns None, then the two elements do not combine. Assume that [b] allows for multiple iterations. - @since NEXT_RELEASE *) + @since 2.3 *) val join_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> @@ -166,7 +166,7 @@ val join_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> using [merge]. If [merge] returns [None], the combination of values is discarded. precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val join_all_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> @@ -183,7 +183,7 @@ val join_all_by : ?eq:('key -> 'key -> bool) -> ?hash:('key -> int) -> - call [merge k l1 l2]. If [merge] returns [None], the combination of values is discarded, otherwise it returns [Some c] and [c] is inserted in the result. - @since NEXT_RELEASE *) + @since 2.3 *) val group_join_by : ?eq:('a -> 'a -> bool) -> ?hash:('a -> int) -> ('b -> 'a) -> @@ -196,7 +196,7 @@ val group_join_by : ?eq:('a -> 'a -> bool) -> ?hash:('a -> int) -> sequences without corresponding values in the second one are mapped to [[]] precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. - @since NEXT_RELEASE *) + @since 2.3 *) val sublists_of_len : diff --git a/src/core/CCVector.mli b/src/core/CCVector.mli index 80ed0a2f0..ddef0e648 100644 --- a/src/core/CCVector.mli +++ b/src/core/CCVector.mli @@ -143,7 +143,7 @@ val map : ('a -> 'b) -> ('a,_) t -> ('b, 'mut) t val map_in_place : ('a -> 'a) -> ('a,_) t -> unit (** Map elements of the vector in place - @since NEXT_RELEASE *) + @since 2.3 *) val filter : ('a -> bool) -> ('a,_) t -> ('a, 'mut) t (** Filter elements from the vector. [filter p v] leaves [v] unchanged but @@ -178,7 +178,7 @@ val filter_map : ('a -> 'b option) -> ('a,_) t -> ('b, 'mut) t val filter_map_in_place : ('a -> 'a option) -> ('a,_) t -> unit (** Filter-map elements of the vector in place - @since NEXT_RELEASE *) + @since 2.3 *) val flat_map : ('a -> ('b,_) t) -> ('a,_) t -> ('b, 'mut) t (** Map each element to a sub-vector. *) diff --git a/src/data/CCIntMap.mli b/src/data/CCIntMap.mli index 178e617f8..b684e380c 100644 --- a/src/data/CCIntMap.mli +++ b/src/data/CCIntMap.mli @@ -12,7 +12,7 @@ val empty : 'a t val is_empty : _ t -> bool (** Is the map empty? - @since NEXT_RELEASE *) + @since 2.3 *) val singleton : int -> 'a -> 'a t @@ -43,11 +43,11 @@ val update : int -> ('a option -> 'a option) -> 'a t -> 'a t val filter : (int -> 'a -> bool) -> 'a t -> 'a t (** Filter values using the given predicate - @since NEXT_RELEASE *) + @since 2.3 *) val filter_map : (int -> 'a -> 'b option) -> 'a t -> 'b t (** Filter-map values using the given function - @since NEXT_RELEASE *) + @since 2.3 *) val cardinal : _ t -> int (** Number of bindings in the map. Linear time. *) @@ -78,7 +78,7 @@ val merge : key that occurs in at least one of [m1] and [m2]. if [f k binding = Some c] then [k -> c] is part of the result, else [k] is not part of the result. - @since NEXT_RELEASE *) + @since 2.3 *) (** {2 Whole-collection operations} *)