rust_black_tree

Crates.iorust_black_tree
lib.rsrust_black_tree
version0.1.5
sourcesrc
created_at2020-03-03 18:18:20.666106
updated_at2020-03-03 23:17:47.336684
descriptionPlease don't use this in something serious lol
homepage
repositoryhttps://github.com/Arunscape/ECE421-GroupProject1/tree/master/rust_black_tree
max_upload_size
id215078
size124,143
Arun Woosaree (Arunscape)

documentation

https://docs.rs/rust_black_tree/

README

User Manual

Getting Started

cargo run

Prerequisites

  • cargo

Installing

change directory into the project's root, and then run

cargo install --path .

The command-line application will then be installed and can be run:

rust_black_tree <new | add | delete | print | clear | quit>

Example usage of CLI

new/create/n/c

Allows for creation of a Red Black tree, AVL tree, or Binary Search tree

new rb
new avl
new bst
create rb
n avl
c bst

add/insert/i/a

Insert a value into the tree

add 5
insert 2
i 6
a 9

delete/del/remove/d/r

Delete a value from the tree

delete 5
del 2
remove 6
d 9
r 10

Note: non-existent values in the tree passed to the delete command will be ignored

print/p

Print the current tree

print
p

clear/clr

Removes everything in the tree

clear
clr

quit/exit

Exit the CLI

quit
exit

Running the tests

cargo test

Benchmarking

Benchmark reports can be found in `target/criterion/report/index.html

cargo bench
Note: it is recommended to skip the binary search tree benchmark since it takes a long time to run
cargo bench bench_rbtree

cargo bench bench_avltree

Documentation

Documentation can be easily generated by running

cargo doc --open

Authors

  • Arun Woosaree
  • Jacob Reckhard
  • Alexander Rostron
Commit count: 0

cargo fmt