billyevans/tst

Ternary search tree collection in rust with similar API to std::collections as it possible

Ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search...

tst

Ternary search tree collection in rust with similar API to std::collections as it possible.

Ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two. Like other prefix trees, a ternary search tree can be used as an associative map structure with the ability for incremental string search. However, ternary search trees are more space efficient compared to standard prefix trees, at the cost of speed. Common applications for ternary search trees include spell-checking and auto-completion. TSTMap and TSTSet structures for map and set like usage.

Documentation is available at http://billyevans.github.io/tst/tst

It has special methods:

  • wildcard_iter/wildcard_iter_mut - get iterator by wildcard
  • prefix_iter/prefix_iter_mut - get iterator by prefix
  • longest_prefix - get longest prefix

Usage

Add this to your Cargo.toml:

Quick Start

Iterating over keys with wildcard

Itereting over keys with common prefix

Search for longest prefix in the tree

Implementation details

https://en.wikipedia.org/wiki/Ternary_search_tree

License

TST is distributed under the terms of the MIT license.

See LICENSE-MIT, and COPYRIGHT for details.

Information - Updated Jun 17, 2022

Stars: 19
Forks: 4
Issues: 0

Repositories & Extras

Tantivy is a full text search engine library written in Rust

It is closer to Elasticsearch or benchmark break downs

Tantivy is a full text search engine library written in Rust

A Full-Text Search Engine in Rust

Toshi will always target stable Rust and will try our best to never make any use of unsafe Rust

A Full-Text Search Engine in Rust

Sonic-channel is a rust client for the sonic search backend

Quick and easy way to get started with search in rust

Sonic-channel is a rust client for the sonic search backend

txtai: AI-powered search engine for Rust

Overview of the functionality provided by txtai

txtai: AI-powered search engine for Rust

recon_metadata, book details and metadata search library written in Rust using

recon_metadata, book details and metadata search library written in reqwest

recon_metadata, book details and metadata search library written in Rust using

Roogle is a Rust API search engine, which allows you to search functions by names...

Roogle is a Rust API search engine, which allows you to search functions by names and type signatures

Roogle is a Rust API search engine, which allows you to search functions by names...

Non-official rust library to search Nyaa

si does not provide any APIs so I thought it would be cool to have a way to do so in Rust and that's why...

Non-official rust library to search Nyaa

Roogle is a Rust API search engine, which allows you to search functions by names...

Roogle is a Rust API search engine, which allows you to search functions by names and type signatures

Roogle is a Rust API search engine, which allows you to search functions by names...

SerpApi Search in Rust

This Rust package enables to scrape and parse search results from Google, Bing, Baidu, Yandex, Yahoo, Ebay, Apple, Youtube, Naver, Home depot and more

SerpApi Search in Rust

Elerons - ELectRONics Search with Rust

Elerons is a command line tool for electronic component selection and design optimization facilitated by engineering know-how infused into the software itself

Elerons - ELectRONics Search with Rust
Facebook Instagram Twitter GitHub Dribbble
Privacy