A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
Find a file
2013-03-07 10:12:47 +01:00
tests fixed bug in FlatHashtbl.remove 2013-03-07 10:12:47 +01:00
.gitignore gitignore 2013-03-07 09:59:04 +01:00
.merlin update .merlin 2013-03-07 10:09:21 +01:00
_tags include the sequence module in here, to reduce dependencies. 2013-03-07 10:00:50 +01:00
cache.ml LRU cache implemented 2013-03-06 15:43:54 +01:00
cache.mli LRU cache implemented 2013-03-06 15:43:54 +01:00
containers.mllib tests for the Universal type 2013-03-06 11:00:52 +01:00
deque.ml moved everything to the root directory 2013-03-04 13:25:25 +01:00
deque.mli moved everything to the root directory 2013-03-04 13:25:25 +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
graph.ml fix in Graph.pp 2013-03-05 12:06:43 +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 hashset.union/inter take an optional argument for the resulting set 2013-03-04 17:30:34 +01:00
heap.ml imperative heaps on top of splay trees 2013-03-05 11:05:12 +01:00
heap.mli imperative heaps on top of splay trees 2013-03-05 11:05:12 +01:00
LICENSE gitignore and update of readme; added LICENSE file (BSD) 2013-02-27 16:12:14 +01:00
Makefile include the sequence module in here, to reduce dependencies. 2013-03-07 10:00:50 +01:00
pHashtbl.ml updated benchmark 2013-03-05 00:55:24 +01:00
pHashtbl.mli robin hood hashing for PHashtbl 2013-03-05 00:49:02 +01:00
README.md update of README 2013-03-05 11:48:49 +01:00
sequence.ml include the sequence module in here, to reduce dependencies. 2013-03-07 10:00:50 +01:00
sequence.mli include the sequence module in here, to reduce dependencies. 2013-03-07 10:00:50 +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
univ.ml Universal type embedding 2013-03-06 11:00:36 +01:00
univ.mli Universal type embedding 2013-03-06 11:00:36 +01:00
vector.ml moved everything to the root directory 2013-03-04 13:25:25 +01:00
vector.mli moved everything to the root directory 2013-03-04 13:25:25 +01:00

ocaml-containers

A bunch of containers,written in different occasions. Probably not very high quality, since not all containers are tested (yet).

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

Other structures (not touched for months, may not work properly) are:

  • Cache, a low level memoization cache for pairs of keys
  • Vector, a growable array (pure OCaml, no C)
  • Deque, an imperative double ended FIFO (double-linked list)
  • 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

You need the library sequence. With opam, type opam install sequence.

Then:

$ 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.