rust-diet
=========

An implementation of [Discrete Interval Encoding Trees][diet] in Rust.
Currently only supports i32.

[diet]: http://web.engr.oregonstate.edu/~erwig/papers/Diet_JFP98.pdf

Install
=======

Add `diet` as a dependency to your `Cargo.toml`.

    [dependencies]
    diet = { version = "0.0.1", hg = "ssh://hg@bitbucket.org/nikhilm/rust-diet"
    }

Usage
=====

Create a Diet:

    let mut diet = Diet::new();

Insert elements:

    diet.insert(5);
    diet.insert(10);

Query elements:

    assert!(diet.contains(5));
    assert!(!diet.contains(7));

Delete elements:

    diet.delete(6);
    diet.delete(5);
    assert!(!diet.contains(5));
    assert!(diet.contains(10));
