A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
Find a file
2013-03-23 01:45:46 +01:00
examples forgot to update examples/ 2013-03-21 17:35:23 +01:00
tests update of Bench 2013-03-21 18:55:12 +01:00
.gitignore tags 2013-03-14 14:42:53 +01:00
.merlin example file, that uses LazyGraph to represent memory layout of values (and compute their size) 2013-03-20 10:32:11 +01:00
.ocamlinit forgot to update examples/ 2013-03-21 17:35:23 +01:00
_tags some basic tests for Future 2013-03-20 18:04:04 +01:00
cache.ml changed interface of Cache.S.with_cache_rec 2013-03-07 18:12:35 +01:00
cache.mli correct comments for ocamldoc 2013-03-22 17:42:09 +01:00
containers.mllib skipList module 2013-03-23 01:00:13 +01:00
deque.ml rewrote Deque to be safe (no Obj anymore); 2013-03-14 14:14:13 +01:00
deque.mli rewrote Deque to be safe (no Obj anymore); 2013-03-14 14:14:13 +01:00
fHashtbl.ml added a is_empty function for FHashtbl; 2013-03-10 15:04:38 +01:00
fHashtbl.mli added a is_empty function for FHashtbl; 2013-03-10 15:04:38 +01:00
flatHashtbl.ml fixed bug in FlatHashtbl.remove 2013-03-07 10:12:47 +01:00
flatHashtbl.mli updated the implementation of flatHashtbl: 2013-03-07 10:07:13 +01:00
fQueue.ml added a functional Queue implementation 2013-03-09 20:35:45 +01:00
fQueue.mli added a functional Queue implementation 2013-03-09 20:35:45 +01:00
future.ml expose an optional Pool argument in most Future\'s combinators; 2013-03-21 10:15:35 +01:00
future.mli expose an optional Pool argument in most Future\'s combinators; 2013-03-21 10:15:35 +01:00
gen.ml Gen.intersection, to intersect 2 sorted generators 2013-03-22 09:53:54 +01:00
gen.mli Gen.intersection, to intersect 2 sorted generators 2013-03-22 09:53:54 +01:00
graph.ml bugfix: Graph.is_dag must explore every vertex 2013-03-07 16:55:50 +01:00
graph.mli more graph tests 2013-03-05 11:39:34 +01:00
hashset.ml hashset.union/inter take an optional argument for the resulting set 2013-03-04 17:30:34 +01:00
hashset.mli correct comments for ocamldoc 2013-03-22 17:42:09 +01:00
heap.ml leaner Heap 2013-03-20 15:54:45 +01:00
heap.mli copied code of SplayTree into Heap, to reduce dependencies 2013-03-20 15:49:52 +01:00
lazyGraph.ml renamed Enum into Gen (for "generator"), and updated code and test to reflect so 2013-03-21 17:25:02 +01:00
lazyGraph.mli renamed Enum into Gen (for "generator"), and updated code and test to reflect so 2013-03-21 17:25:02 +01:00
LICENSE gitignore and update of readme; added LICENSE file (BSD) 2013-02-27 16:12:14 +01:00
Makefile examples graphs; small program that computes the collatz suite 2013-03-21 12:25:03 +01:00
pHashtbl.ml updated benchmark 2013-03-05 00:55:24 +01:00
pHashtbl.mli correct comments for ocamldoc 2013-03-22 17:42:09 +01:00
README.md update of README and .mllib 2013-03-14 14:45:33 +01:00
sequence.ml a bugfix in Sequence.product; 2013-03-08 16:04:16 +01:00
sequence.mli updated sequence files 2013-03-08 15:44:43 +01:00
skipList.ml faster SkipList.find 2013-03-23 01:45:46 +01:00
skipList.mli skipList module 2013-03-23 01:00:13 +01:00
splayTree.ml splay heaps are implemented 2013-03-05 11:05:00 +01:00
splayTree.mli splay heaps are implemented 2013-03-05 11:05:00 +01:00
thread_containers.mllib renamed Futures into Future 2013-03-20 15:27:44 +01:00
univ.ml cleanrer interface for Univ 2013-03-14 14:43:08 +01:00
univ.mli cleanrer interface for Univ 2013-03-14 14:43:08 +01:00
utils.ml rewrote Deque to be safe (no Obj anymore); 2013-03-14 14:14:13 +01:00
vector.ml force Vector's initial size to be >= 3 2013-03-17 18:45:53 +01:00
vector.mli small updates of Vector; 2013-03-17 18:43:46 +01:00

ocaml-containers

A bunch of containers,written in different occasions. Not all containers are properly tested (see tests/ and make tests if you have installed OUnit).

The design is centerred around polymorphism rather than functors. Such structures comprise:

  • PHashtbl, a polymorphic hashtable (with open addressing)
  • SplayTree, a polymorphic splay heap implementation
  • Heap, an imperative heap based on SplayTree
  • Graph, a polymorphic imperative directed graph (on top of PHashtbl)
  • Hashset, a polymorphic imperative set on top of PHashtbl
  • FQueue, a purely functional queue structure
  • Heap, a purely functional polymorphic heap

Other structures are:

  • Univ, a universal type encoding with affectation
  • Cache, a low level memoization cache for unary and binary functions
  • Deque, an imperative double ended FIFO (double-linked list)
  • Vector, a growable array (pure OCaml, no C; not tested)
  • FlatHashtbl, a (deprecated) open addressing hashtable with a functorial interface (replaced by PHashtbl)

Use

You can either build and install the library (see Build), or just copy files to your own project. The last solution has the benefits that you don't have additional dependencies nor build complications (and it may enable more inlining). I therefore recommand it for its simplicity.

If you have comments, requests, or bugfixes, please share them! :-)

Build

There are no dependencies (Sequence is included). Type:

$ make

To build and run tests (requires oUnit):

$ opam install oUnit
$ make tests
$ ./tests.native

To build the small benchmarking suite (requires Bench):

$ opam install bench
$ make bench
$ ./benchs.native

License

This code is free, under the BSD license.