mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 03:35:30 -05:00
prepare for 2.3
This commit is contained in:
parent
e530547356
commit
d4a9b0a8d1
6 changed files with 32 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -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) ->
|
||||
|
|
|
|||
|
|
@ -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 :
|
||||
|
|
|
|||
|
|
@ -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. *)
|
||||
|
|
|
|||
|
|
@ -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} *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue