An open API service indexing awesome lists of open source software.

https://github.com/habedi/spart

A collection of space partitioning trees for Rust 🦀
https://github.com/habedi/spart

bsp-tree indexing kd-tree knn-search octree quadtree range-search rtree rust-lang rust-library space-partition-tree

Last synced: 6 months ago
JSON representation

A collection of space partitioning trees for Rust 🦀

Awesome Lists containing this project

README

          

## Spart

[tests](https://github.com/habedi/spart/actions/workflows/tests.yml)
[lints](https://github.com/habedi/spart/actions/workflows/lints.yml)
[code coverage](https://codecov.io/gh/habedi/spart)
[codefactor](https://www.codefactor.io/repository/github/habedi/spart)
[crates.io](https://crates.io/crates/spart)
[docs.rs](https://docs.rs/spart)
[downloads](https://crates.io/crates/spart)
[msrv](https://github.com/rust-lang/rust/releases/tag/1.83.0)
[dependencies](https://deps.rs/repo/github/habedi/spart)
[docs](docs)
[license](https://github.com/habedi/spart)

Spart (**s**[pace] **par**[titioning] **t**[rees] is a Rust library that provides implementations of various
space partitioning tree data structures for efficient indexing and searching 2D and 3D point data.

Currently, the following trees are implemented:

| Index | Tree Type | 2D | 3D | kNN Search | Range Search |
|-------|----------------------------------------------------|----|----|------------|--------------|
| 1 | [Quadtree](https://en.wikipedia.org/wiki/Quadtree) | ✓ | | ✓ | ✓ |
| 2 | [Octree](https://en.wikipedia.org/wiki/Octree) | | ✓ | ✓ | ✓ |
| 3 | [Kd-tree](https://en.wikipedia.org/wiki/K-d_tree) | ✓ | ✓ | ✓ | ✓ |
| 4 | [R-tree](https://en.wikipedia.org/wiki/R-tree) | ✓ | ✓ | ✓ | ✓ |
| 5 | [BSP-tree](https://en.wikipedia.org/wiki/BSP-tree) | ✓ | ✓ | ✓ | ✓ |

### Installation

```bash
cargo add spart
```

*Spart requires Rust 1.83.0 or later.*

### Documentation

The documentation for the latest release can be found [here](docs).

Additionally, check out the [tests](tests/) directory for detailed examples for how to use the library.

### Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to make a contribution.

### License

Spart is available under the terms of either of the following licenses:

* MIT License ([LICENSE-MIT](LICENSE-MIT))
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))