Commit graph

95 commits

Author SHA1 Message Date
Simon Cruanes
2fda76a5f7
factor implem for Vec.{find,find_i} 2024-12-13 00:19:05 -05:00
Simon Cruanes
cad41d70d6
ocamlformat 2024-12-13 00:17:53 -05:00
John Hester
b140a50c46 feat: add CCVector.findi 2024-12-13 00:15:27 -05:00
Simon Cruanes
f02df05b35
additional fix for #454 on OCaml 4.10..4.12 2024-11-18 12:22:16 -05:00
Simon Cruanes
c959e396b3
fix #454: work around a weird miscompilation 2024-09-17 12:51:07 -04:00
Simon Cruanes
0b0dd83423
reformat all the things 2024-05-13 20:57:53 -04:00
Master Builder
17eab9c3f4 CCVector: Add function foldi 2024-01-11 12:19:12 -05:00
Gabriel Scherer
9de8f1fb2e CCVector: fix two labels-omitted warnings
These warnings are silenced by the use of -nolabels in the compilation
flags (which I understand is designed to make the life of the
CC*Labels file easier, not let minor labeling mistakes sleep in.)
2024-01-04 16:44:34 -05:00
Simon Cruanes
1a23731730
remove conditional over OCaml >= 4.08
in particular, all the let-ops are now unconditional!
2023-06-24 15:22:21 -04:00
Simon Cruanes
bbfbe0f770
fix many, many warnings 2023-06-06 22:16:20 -04:00
Simon Cruanes
503c61f72b
fix(vector): make sure Vector.to_{seq,gen} captures the length initially 2023-03-13 15:37:00 -04:00
Simon Cruanes
b1c39832aa fix(CCVector): concurrent modification safety in resize_with 2023-01-08 22:42:24 -05:00
Simon Cruanes
b73fc4ee5c fix(CCVector): always obtain a copy of array before using unsafe_{set,get}
close #423
2023-01-08 22:42:24 -05:00
Simon Cruanes
10865eaced reformat 2022-07-04 13:36:06 -04:00
Simon Cruanes
919360f96e
remove ounit 2022-07-02 23:18:16 -04:00
Simon Cruanes
b695918e99
move all core tests to new testlib 2022-07-02 00:29:25 -04:00
Simon Cruanes
58ac755f82
chore: move to ounit2
see if that fixes the windows build.
2022-06-09 21:39:09 -04:00
Simon Cruanes
40189757ca
Merge pull request #401 from c-cube/experiment-preproc
custom preprocessor rather than shim modules
2022-02-22 23:15:56 -05:00
Simon Cruanes
b837509de9
remove many more shims 2022-02-21 21:52:06 -05:00
Yotam Barnoy
408c14fac7
CCVector.insert: check if there's a need to blit
Co-authored-by: Simon Cruanes <simon.cruanes.2007@m4x.org>
2022-02-21 18:50:19 +02:00
Yotam Barnoy
9bb280e353 CCVector: add insert 2022-02-21 18:42:16 +02:00
Simon Cruanes
21c10d2ad4
less aggressive constant.
series of sizes should now be:

```
 # let next n = n + n lsr 1 + 2;;
 # CCSeq.unfold (fun x -> Some (x, next x)) 0 |> CCSeq.take 20 |> CCSeq.to_list;;
- : int list =
[0; 2; 5; 9; 15; 24; 38; 59; 90; 137; 207; 312; 470; 707; 1062; 1595; 2394;
 3593; 5391; 8088]
 ```
2022-02-03 19:15:13 -05:00
Simon Cruanes
02c0953468
fix stupid typo 2022-02-03 19:13:43 -05:00
Simon Cruanes
0baa4fddec
perf(vector): inline some more stuff plz 2022-02-03 18:55:50 -05:00
Simon Cruanes
f540a6d7e5
perf(vector): less aggressive growth for internal resizing 2022-02-03 18:50:32 -05:00
Simon Cruanes
2c2fa5d008
fix asymptotic behavior of resize functions 2021-10-21 11:07:11 -04:00
Simon Cruanes
e6e07ba4da
fix tests and implem for CCVector 2021-10-21 10:59:03 -04:00
Dario Pinto
d1ddeeb31f
add CCVector.resize_with and CCVector.resize_with_init, tests and doc (#389)
add CCVector.resize_with and CCVector.resize_with_init, tests and doc
2021-10-21 10:57:23 -04:00
Simon Cruanes
541d716d5c
in CCVector, use invalid_arg, and document it 2021-10-20 10:47:06 -04:00
Fardale
302dba6cb5 chore(CCOption): rename CCOpt to CCOption and deprecate CCOpt
In the stdlib the module associated with the option type is called
Option and in containers it was called CCOpt. Renaming CCOpt to CCOption
make the name of containers module uniforme with respect to the stdlib.
2021-09-22 23:07:05 +02:00
Simon Cruanes
1b87075284 fix test for multicore 2021-08-02 13:32:09 -04:00
Fardale
01da25cead break: change pp functions to take unit printer for sep/stop/start
sep/stop/start -> pp_sep/pp_stop/pp_start
string -> unit printer
2020-07-27 22:57:29 -04:00
Fardale
c85c135157 break: remove klist type and functions from core 2020-07-23 16:32:52 +02:00
Fardale
8c3d716ab1 break: rename fonction from *std_seq* to *seq* 2020-07-23 16:32:52 +02:00
Fardale
20234cdd22 fix(CCVector): rename shrink into truncate 2020-06-30 09:02:52 -05:00
Fardale
2faa3fbae5 chore(CCVector): rename remove to remove_and_shift 2020-04-28 08:53:35 -05:00
Fardale
c8d61a1248 feat(CCVector): add remove
remove keep the order of the element but need to move
all element after the removed one.
2020-04-28 08:53:35 -05:00
Fardale
c1461940c2 wip(3.0): rename CCVector.remove to CCVector.remove_unordered 2020-04-28 08:53:35 -05:00
Simon Cruanes
a767e4618d wip(3.0): remove deprecated functions, in particular sequence 2020-04-24 20:16:53 -04:00
Fardale
2b5f2fce11 feat(CCVector): add filter_in_place, deprecate filter' 2020-01-08 23:17:53 +01:00
Simon Cruanes
138047ef11 feat: add {to,of,add}_{iter,std_seq} where relevant; deprecations
deprecate `seq` named functions (for `iter`)
deprecate klist functions (for `std_seq`)

close #231
2019-12-14 16:29:07 -06:00
Fardale
27eb874523 CCVector: resize_ take the elt as argument
It is safer to have the check on the size of the underlying array
close to access of the first element.
2019-12-14 13:44:57 -06:00
Simon Cruanes
bf0227d404 feat: on 4.08, support let operators
close #276
2019-12-14 12:08:48 -06:00
Simon Cruanes
037a0ef922 Merge branch 'wip-ccvec' 2019-12-14 12:08:33 -06:00
Fardale
bbdcd93417 wip: improved gc behavior for ccvector 2019-12-14 11:50:47 -06:00
Fardale
1d589cf4ac use array_is_empty_ instead of direct check 2019-12-14 11:50:47 -06:00
Simon Cruanes
28f8872ef5 feat: add monoid_product to Array and Vector 2019-12-10 21:38:07 -06:00
Simon Cruanes
858616606b add CCVector.shrink_to_fit to limit memory usage 2019-12-10 16:39:35 -06:00
Simon Cruanes
1239960c42 wip: improved gc behavior for ccvector 2019-12-10 16:39:35 -06:00
Simon Cruanes
236a0c43ce feat: add CCVector.clear_and_reset 2019-12-10 16:39:35 -06:00