rstar/
lib.rs

1//! An n-dimensional r*-tree implementation.
2//!
3//! This crate implements a flexible, n-dimensional r-tree implementation with
4//! the r* (r star) insertion strategy.
5//!
6//! # R-Tree
7//! An r-tree is a data structure containing _spatial data_ and is optimized for
8//! nearest neighbor search.
9//! _Spatial data_ refers to an object that has the notion of a position and extent,
10//! for example points, lines and rectangles in any dimension.
11//!
12//!
13//! # Further documentation
14//! The crate's main data structure and documentation is the [RTree] struct.
15//!
16//! Also, the pre-defined primitives like lines and rectangles contained in
17//! the [primitives module](crate::primitives) may be of interest for a quick start.
18//!
19//! # (De)Serialization
20//! Enable the `serde` feature for [Serde](https://crates.io/crates/serde) support.
21//!
22#![deny(missing_docs)]
23#![forbid(unsafe_code)]
24#![cfg_attr(not(test), no_std)]
25
26extern crate alloc;
27
28mod aabb;
29mod algorithm;
30mod envelope;
31mod node;
32mod object;
33mod params;
34mod point;
35pub mod primitives;
36mod rtree;
37
38#[cfg(test)]
39mod test_utilities;
40
41pub use crate::aabb::AABB;
42pub use crate::algorithm::rstar::RStarInsertionStrategy;
43pub use crate::algorithm::selection_functions::SelectionFunction;
44pub use crate::envelope::Envelope;
45pub use crate::node::{ParentNode, RTreeNode};
46pub use crate::object::{PointDistance, RTreeObject};
47pub use crate::params::{DefaultParams, InsertionStrategy, RTreeParams};
48pub use crate::point::{Point, RTreeNum};
49pub use crate::rtree::RTree;
50
51pub use crate::algorithm::iterators;