flat-tree 3.1.0

Rust module for encoding/decoding varints that doesn't do any IO. Inspired by the Node.js varint module

flat-tree

crates.io version build status downloads docs.rs docs

Map a binary tree to a list. Adapted from mafintosh/flat-tree.

Usage

extern crate flat_tree;

let parent = flat_tree::parent(0);
println!("parent of 0 is {}", parent);

Why?

You can represent a binary tree in a simple flat list using the following structure:

      3
  1       5
0   2   4   6  ...

This module exposes a series of functions to help you build and maintain this data structure.

License

MIT OR Apache-2.0