Skip to content
Snippets Groups Projects
Unverified Commit 172c41ee authored by Daniel Rose's avatar Daniel Rose
Browse files

Documentation headers with code examples added to modules

parent 95fc54da
No related branches found
No related tags found
No related merge requests found
// Copyright 2018 Kevin Kaßelmann, David Mehren, Daniel Rose and Frederik Stehli.
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
// This file may not be copied, modified, or distributed
// except according to those terms.
//! Succinct Tree library with implementations for the succinct trees LOUDS, BP
//! and the Range Min Max data structure. LOUDS and BP use the Rank/Select data
//! structure from the Rust-Bio crate. Code examples can be found in the submodules.
extern crate bio; extern crate bio;
#[macro_use] #[macro_use]
extern crate bv; extern crate bv;
......
// Copyright 2018 Kevin Kaßelmann.
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
// This file may not be copied, modified, or distributed
// except according to those terms.
//! BP succinct tree implementation based on Jacobson (1989), Munro and Raman (2001),
//! Arroyuelo et al. (2010) and Cordova and Navarro (2016).
//!
//! Example
//!
//! ```
//! #[macro_use]
//! extern crate bv;
//! # extern crate fp_succinct_trees_1;
//!
//! # fn main() {
//! use bv::BitVec;
//! use bv::Bits;
//! use fp_succinct_trees_1::common::succinct_tree::SuccinctTree;
//! use fp_succinct_trees_1::trees::bp_tree::BPTree;
//!
//! let bitvec = bit_vec!(true, true, false, false);
//! let tree = BPTree::from_bitvec(bitvec.clone()).unwrap();
//! assert!(tree.is_leaf(1).unwrap());
//! # }
//! ```
use bincode::{deserialize, serialize}; use bincode::{deserialize, serialize};
use bio::data_structures::rank_select::RankSelect; use bio::data_structures::rank_select::RankSelect;
use bv::BitVec; use bv::BitVec;
......
// Copyright 2018 David Mehren.
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
// This file may not be copied, modified, or distributed
// except according to those terms.
//! LOUDS succinct tree implementation based on Jacobson (1989) and Arroyuelo et al. (2010)
//!
//! Example
//!
//! ```
//! #[macro_use]
//! extern crate bv;
//! # extern crate fp_succinct_trees_1;
//!
//! # fn main() {
//! use bv::BitVec;
//! use bv::Bits;
//! use fp_succinct_trees_1::common::succinct_tree::SuccinctTree;
//! use fp_succinct_trees_1::trees::louds_tree::LOUDSTree;
//!
//! let bitvec = bit_vec![true, true, false, false];
//! let tree = LOUDSTree::from_bitvec(bitvec.clone()).unwrap();
//! assert!(tree.is_leaf(3).unwrap());
//! # }
//! ```
use bincode::{deserialize, serialize}; use bincode::{deserialize, serialize};
use bio::data_structures::rank_select::RankSelect; use bio::data_structures::rank_select::RankSelect;
use bv::{BitVec, Bits}; use bv::{BitVec, Bits};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment