• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    C
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RRB-tree implemented as a library in C.
Relaxed Radix Balanced Trees (RRB-trees)

An immutable vector-like data structure with very good performance
characteristics for concatenation and slicing. Also provides transient
(mutable-like) variants which you can convert to and from in constant time.

+-----------+---------------+
| Operation |  Eff. runtime |
+-----------+---------------+
| Lookup    | O(~1)         |
| Last      | O(1)          |
| Count     | O(1)          |
| Update    | O(~1)         |
| Append    | O(~1)         |
| Pop       | O(~1)         |
| Iteration | O(n)*         |
| Concat    | O(log n)      |
| Slice     | O(~1)         |
+-----------+---------------+
* Amortised constant time – O(1) – per element.

For an explanation on how this data structure works in detail, read
http://infoscience.epfl.ch/record/169879/files/RMTrees.pdf and then my thesis:
http://hypirion.com/thesis



This library, unmodified, depends on automake tools and Boehm GC.

On OSX (at least on Mavericks, presumably also on Yosemite), you can install
automake tools and Boehm GC with Homebrew like this:

  brew install boehmgc libtool

On Debian-based distros, you can install the automake tools through:

  sudo apt-get install build-essential automake autoconf gnu-standards\
                       autoconf-doc libtool gettext autoconf-archive

and Boehm GC through:

  sudo apt-get install libgc-dev libgc1c2

To build and install the library, perform the following calls:

  autoreconf --install
  CFLAGS='-Ofast' ./configure
  make
  make check ## but only if you want to
  sudo make install

The `sudo make install` call should return a message which tells you where the
library has been installed (usually `/usr/local/lib`). Now, to check that the
installation went successfully, you try to compile one of the test suite
programs on its own:

  cd test-suite
  gcc -o testy printing_example.c -std=c11 -lrrb -lgc
  ./testy # should work fine, and should create the file "foo.dot"
  dot -Tpng -o foo.png foo.dot # If you have `dot` installed

If this doesn't work by default, then it might be that your linker has a cache
which needs to be updated. Try `sudo ldconfig` and rerun the compilation step.
    
If you want to uninstall the library, do `sudo make uninstall` in the project
root directory. (You have to ./configure it first though.)

Copyright Β© 2013-2014 Jean Niklas L'orange

Distributed under the MIT License (MIT). You can find a copy in the root of this
project with the name COPYING.

More Repositories

1

inlein

Run clojure scripts with dependencies.
Java
190
star
2

clj-xchart

XChart wrapper for Clojure
Clojure
110
star
3

lein-shell

Call shell from within Leiningen.
Clojure
56
star
4

clj-conduit

Clojure transducers with a more readable interface
Clojure
33
star
5

haskell-transducers

Clojure's Transducers in Haskell
Haskell
33
star
6

roulette-tree

Data structure for efficient fitness-proportionate selection.
C
24
star
7

beckon

Handle POSIX signals in Clojure.
Java
22
star
8

pvec-perf

Persistent vector performance measurements and analysis
Java
21
star
9

multicompile-example

An example on how to perform multiple java/clj compile steps in Leiningen.
Clojure
18
star
10

go-filecache

LRU filecache for "immutable" file stores
Go
14
star
11

swearjure

Clojure interpreter that does not support alphanumerics.
Haskell
11
star
12

typed-http-server-in-go

It's a typed HTTP server in Go, using generics that is expected to come out with 1.18
Go
9
star
13

rexf

Recursive reducers and transducers
Clojure
7
star
14

hello-swearjure

Hello world in Swearjure.
Clojure
6
star
15

primes

Fetch, locate and use prime numbers in Clojure.
Java
6
star
16

git-multipunchcard

Like git-punchcard, but for a collection of projects
Python
5
star
17

fairbrook

Fine-grained map manipulation for the masses.
Clojure
5
star
18

astyx

Abstract syntax trees from Clojure code.
Clojure
5
star
19

go-errmonad

The bind operation (>>=) for Go's equivalent of Haskell's Either/Error type.
Go
4
star
20

persistencia

Repository with implementations to understand persistent data structures.
C
4
star
21

com.hypirion.io

I/O classes in Java for those with specific needs.
Java
3
star
22

subtex

Parser in Clojure that translates a subset of tex into hiccup-like style
Clojure
3
star
23

errnils

Count number of "err != nil"s in your Go code.
Shell
3
star
24

advent-of-code

Solutions to advent of code in many different styles
Factor
2
star
25

java-bencode

Java library for Bencode streaming
Java
2
star
26

contests

Solutions to some programming contests I've participated in.
Java
1
star
27

tc-solutions

Topcoder solutions by me.
Java
1
star
28

genetica

EA in Erlang
Erlang
1
star
29

moon-castle

(Yet another) Clojure wrapper library for Bouncy Castle
Clojure
1
star
30

gen-java-src

Generate Java code through Clojure test.check-generators.
Clojure
1
star
31

mpi-cheatsheet

Yet another cheatsheet for MPI.
TeX
1
star
32

phenex

A boosting program with diverse classifiers, like music to your ears.
Common Lisp
1
star
33

sc-sugar

A (temporary?) sugar macro library for simple check.
Clojure
1
star
34

lein-miditest

Leiningen plugin which plays a little note whenever tests/retests have finished.
Clojure
1
star
35

tethysthesis

LaTeX-template for larger project documentation/theses
TeX
1
star
36

tethysarticle

LaTeX template for online papers by computer scientists.
TeX
1
star
37

erling

Erling: An IRC bot in Erlang.
Erlang
1
star