Skip to content

Commit

Permalink
prepare for 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Aug 6, 2018
1 parent e530547 commit d4a9b0a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion containers.opam
Original file line number Diff line number Diff line change
@@ -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: [
Expand Down
10 changes: 5 additions & 5 deletions src/core/CCList.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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) ->
Expand All @@ -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) ->
Expand All @@ -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) ->
Expand Down
10 changes: 5 additions & 5 deletions src/core/CCListLabels.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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) ->
Expand All @@ -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) ->
Expand All @@ -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 :
Expand Down
4 changes: 2 additions & 2 deletions src/core/CCVector.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. *)
Expand Down
8 changes: 4 additions & 4 deletions src/data/CCIntMap.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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. *)
Expand Down Expand Up @@ -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} *)

Expand Down

0 comments on commit d4a9b0a

Please sign in to comment.