Socket
Book a DemoInstallSign in
Socket

aatree

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aatree

0.2.2
Source
Cargo
Version published
Maintainers
0
Created
Source

AA Tree

Build Status crates.io docs.rs Documentation License MSRV Chat

This crate implements an AA Tree in Rust. An AA Tree is basically a Red-Black Tree that disallows right children to be red. This results for less complexity in the implementation. For further details on the data structure, see https://en.wikipedia.org/wiki/AA_tree for more information on the data structure.

The standard library comes with a good set of data structures. See std::collections for a list of data structures and their (dis)advantages, however, not all advertised functionality of BTreeMap is actually implemented (at the time of writing). On average, this AA Tree implementation is about half as fast as the standard libraries BTree data structures.

When to use AATree over std::collections::BTree

  • Your application doesn't benefit from CPU caching but does from simpler implementations
  • You want to find the largest or smallest key that is smaller or larger than something
  • You need a BST that you can freely search with your own routine

When to use AATree over std::vec::Vec

  • You need a sorted data structure
  • You need to efficiently check whether a key is contained or not
  • You need a BST that you can freely search with your own routine

Runtime Comparison

Insert Operation Comparison Contains Operation Comparison Remove Operation Comparison

Versioning

As all rust crates, this crate will follow semantic versioning guidelines. However, increasing the MSRV (minimum supported rust version) is not considered a breaking change.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

FAQs

Package last updated on 22 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.