Giter Site home page Giter Site logo

c-rrb's Introduction

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

c-rrb's People

Contributors

hypirion avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.