Commit graph

137 commits

Author SHA1 Message Date
Simon Cruanes
a9cdce9424 Gen.intersection, to intersect 2 sorted generators 2013-03-22 09:53:54 +01:00
Simon Cruanes
09817b236a update of Bench 2013-03-21 18:55:12 +01:00
Simon Cruanes
0af36e124e added repeatedly, rand_int, of_array and to_array to Gen 2013-03-21 18:06:00 +01:00
Simon Cruanes
6ba411d7f5 lower level pp function 2013-03-21 17:51:44 +01:00
Simon Cruanes
7ed1bced9d forgot to update examples/ 2013-03-21 17:35:23 +01:00
Simon Cruanes
2033f07aff renamed Enum into Gen (for "generator"), and updated code and test to reflect so 2013-03-21 17:25:02 +01:00
Simon Cruanes
dfbce71324 Enum.reduce 2013-03-21 17:19:50 +01:00
Simon Cruanes
ebbf4a9138 more explanations about merge 2013-03-21 17:14:15 +01:00
Simon Cruanes
6a918a95dc binary sorted_merge 2013-03-21 17:11:04 +01:00
Simon Cruanes
a49b37dbdb added infix operators in the module 2013-03-21 17:03:14 +01:00
Simon Cruanes
13fd7da142 added a lot of operations on Enum, including sort, uniq, for_all, exists, mem, min, max, group, unzip, unfold, scan 2013-03-21 16:48:46 +01:00
Simon Cruanes
0694064ef5 mutable structure to build LazyGraph on top 2013-03-21 13:53:51 +01:00
Simon Cruanes
c248c9b677 added some benchs of Sequence vs Enum 2013-03-21 12:35:22 +01:00
Simon Cruanes
1c1d602ca7 improvements in Enum (should be more efficient) 2013-03-21 12:25:14 +01:00
Simon Cruanes
9cd07d3395 examples graphs; small program that computes the collatz suite 2013-03-21 12:25:03 +01:00
Simon Cruanes
e0b6b8be5b LazyGraph is now fully polymorphic (plan to implement LazyGraph.product, which
cannot be expressed with functors), with optional eq/hash functions
2013-03-21 11:22:41 +01:00
Simon Cruanes
e6eb9a79eb expose an optional Pool argument in most Future\'s combinators;
handlers of a future are scheduled in pool rather than sequentially (to avoid
possible deadlocks among them)
2013-03-21 10:15:35 +01:00
Simon Cruanes
08d33095f6 Future.sleep should take a float 2013-03-20 18:06:50 +01:00
Simon Cruanes
170c1031a9 some basic tests for Future 2013-03-20 18:04:04 +01:00
Simon Cruanes
174f10e4f2 update of the thread pool. It is growable, up to a certain limit, and threads are cached;
idle threads are killed after some (soft) time limit;
2013-03-20 17:53:49 +01:00
Simon Cruanes
43f926dcb3 copied Heap into Enum for implementing merge_sorted; test merge_sorted 2013-03-20 16:09:55 +01:00
Simon Cruanes
c1ad18407f fix in ocamlinit 2013-03-20 16:09:12 +01:00
Simon Cruanes
02481a9352 leaner Heap 2013-03-20 15:54:45 +01:00
Simon Cruanes
35aa6cb03a copied code of SplayTree into Heap, to reduce dependencies 2013-03-20 15:49:52 +01:00
Simon Cruanes
772e6e6844 renamed Futures into Future 2013-03-20 15:27:44 +01:00
Simon Cruanes
fac35bf61c renamed some operations in Enum 2013-03-20 13:58:50 +01:00
Simon Cruanes
fb75b7299b some functions of Enum are also available for Enum.Gen 2013-03-20 11:55:53 +01:00
Simon Cruanes
1d2e514d45 parametrize Futures.Pool with lifetime of transient threads; also give them time to
process jobs by increasing max_load temporarily
2013-03-20 10:54:26 +01:00
Simon Cruanes
e35f3c61dd circular list in examples/mem_size 2013-03-20 10:53:07 +01:00
Simon Cruanes
4839dd82ba example file, that uses LazyGraph to represent memory layout of values (and compute their size) 2013-03-20 10:32:11 +01:00
Simon Cruanes
b9ddea21bd fix error in Makefile 2013-03-20 09:41:59 +01:00
Simon Cruanes
1445104e2b comprehensive BFS;
implemented LazyGraph.Dot.pp (and pp_enum to have more control);
LazyGraph.map and filter implemented too
2013-03-20 01:12:52 +01:00
Simon Cruanes
64a50fbedf pretty printing of an Enum 2013-03-20 01:10:36 +01:00
Simon Cruanes
bd99d044f7 simpler and better interface for LazyGraph.Dot;
LazyGraph.Full traversals start from an enum of vertices and not just one vertex
2013-03-20 00:16:53 +01:00
Simon Cruanes
5b4e205591 Enum.dup combinator 2013-03-19 23:59:07 +01:00
Simon Cruanes
025985b1df implementation of DFS 2013-03-19 23:29:07 +01:00
Simon Cruanes
c72cc692a7 IntGraph provided as facility;
BFS properly handles the optional start id
2013-03-19 21:45:05 +01:00
Simon Cruanes
5454f2dd32 BFS implemented 2013-03-19 21:32:49 +01:00
Simon Cruanes
9a66e90a02 bugfix in the scheduler 2013-03-19 18:09:56 +01:00
Simon Cruanes
81e7ee2c04 Futures.choose implemented 2013-03-19 17:18:16 +01:00
Simon Cruanes
c8b7b7dfed added Futures.sleep function;
Futures.MVar implemented;
Futures.sequence implemented (quite subtle)
2013-03-19 17:12:26 +01:00
Simon Cruanes
a4c8e3e408 close input of subprocess once stdin has been sent to it 2013-03-19 16:21:23 +01:00
Simon Cruanes
9708c4b01c Futures.MVar module (not implemented) for sharing values;
handlers to attach on a future to react upon failure/success/termination;
Futures.map implemented using handlers, flatMap also uses handlers (more lightweight);
growable thread pool (transient threads are added when the number of waiting jobs is too high)
2013-03-19 16:11:38 +01:00
Simon Cruanes
23029332df added Futures.is_done function;
.ocamlinit file to import stuff in the toplevel
2013-03-19 15:10:41 +01:00
Simon Cruanes
579746810e modified build system and other data for threading support 2013-03-19 15:04:42 +01:00
Simon Cruanes
41274c309e implementation of Futures 2013-03-19 15:04:18 +01:00
Simon Cruanes
205d47e81d interface for preemptive threading Futures 2013-03-19 14:35:19 +01:00
Simon Cruanes
21f499a5f5 fixed absurd comment;
better product implementation (in case outer is big and outer is empty)
2013-03-19 13:43:02 +01:00
Simon Cruanes
db302adab2 one more signature to be implemented later 2013-03-19 12:13:46 +01:00
Simon Cruanes
e83298ef24 moved generator functions into Enum.Gen 2013-03-19 11:44:48 +01:00