-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ path = "src/bin/bin.rs" | |
|
||
[package] | ||
name = "kgst" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
edition = "2021" | ||
path = "src/lib.rs" | ||
authors = ["Sriram Vijendran <[email protected]>"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
//! # K-Truncated Generalized Suffix Tree | ||
//! Implementation of the [truncated suffix tree](https://pubmed.ncbi.nlm.nih.gov/18283030/) | ||
//! construction of which is performed in linear time | ||
//! | ||
//! ## Examples | ||
//! | ||
//! ``` | ||
//! use generalized_suffix_tree::suffix_tree::KGST; | ||
//! | ||
//! // Initalize empty tree | ||
//! let mut tree: KGST<char, String> = KGST::new('$'); | ||
//! | ||
//! // insert item with corresponding item id | ||
//! let item_string:Vec<char> = "MKAILVVLLYTFTTADADTLCIGYHANNSTDTVDTVLEKNVTVTHSVNLLENRHNGKLCKLRGVAPLHLGKCNIAGWILGNPECESLSTAGSWSYIVETSNPDNGTCYPGDFINYEELREQLSSVSSFEKFEIFPKTSSWPNHDTNRGVTAACPHDGAKSFYRNLLWLVKKEKENSYPMINKSYTNNKGKEVLVLWAIHHPATSADQQSLYQNANAYVFVGSSKYSKKFEPEIAARPKVRDQAGRMKYYWTLVEPGDKITFEATGNLVVPIYAFALKRNSGSGIIISDTSVHDCDTTCQTPNGAINTSLPFQNIHPVTIGECPKYVKSTKLRMATGLRNIPSIQSRGLFGAIAGFIEGGWTGMIDGWYGYHHQNEQGSGYAADLKSTQNAIDGITNKVNSVIEKMNTQFTAVGKEFNHLERRIENLNKKVDDGFLDIWTYNAELLVLLENERTLDYHDSNVKNLYEKVRSQLKNNAKEIGNGCFEFYHKCDDTCMESVKNGTYDYPKYSEEAKLNREEIDGVKLESTRIYQILAIYSTVASSLVLVVSLGAISFWMCSNGSLQCRICI".chars().collect(); | ||
//! let item_id:String = "World".to_string(); | ||
//! tree.insert(item_id.clone(), item_string.clone(),&0); | ||
//! | ||
//! | ||
//! // Query if some string is a substring in the tree | ||
//! let substring_match = tree.substring_match(&item_string[i..i+max_depth+1]); | ||
//! | ||
//! // Query if some string is a suffix in the tree | ||
//! let suffix_match = tree.suffix_match(&item_string[i..i+max_depth+1]); | ||
//! | ||
//! // Clear tree | ||
//! tree.clear(); | ||
//! ``` | ||
pub mod suffix_node; | ||
pub mod suffix_tree; | ||
pub mod tree_item; |