Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix ImmutableKdTree links and size example code #114 #119

Merged
merged 3 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/immutable/float/kdtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,13 @@ where
///
/// # Examples
///
/// ```rust
/// use kiddo::float::kdtree::KdTree;
///
/// let mut tree: KdTree<f64, u32, 3, 32, u32> = KdTree::new();
/// ```
/// use kiddo::immutable::float::kdtree::ImmutableKdTree;
///
/// tree.add(&[1.0, 2.0, 5.0], 100);
/// tree.add(&[1.1, 2.1, 5.1], 101);
/// let points: Vec<[f64; 3]> = vec!([1.0f64, 2.0f64, 3.0f64]);
/// let tree: ImmutableKdTree<f64, u32, 3, 32> = ImmutableKdTree::new_from_slice(&points);
///
/// assert_eq!(tree.size(), 2);
/// assert_eq!(tree.size(), 1);
/// ```
#[inline]
pub fn size(&self) -> usize {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! - Its standard floating-point k-d tree, exposed as [`kiddo::KdTree`](`crate::KdTree`)
//! - **integer / fixed point support** via the [`Fixed`](https://docs.rs/fixed/latest/fixed/) library;
//! - **instant zero-copy deserialization** and serialization via [`Rkyv`](https://docs.rs/rkyv/latest/rkyv/) ([`Serde`](https://docs.rs/serde/latest/serde/) still available).
//! - An [`ImmutableKdTree`](`float::kdtree::ImmutableKdTree`) with space and performance advantages over the standard
//! - An [`ImmutableKdTree`](`immutable::float::kdtree::ImmutableKdTree`) with space and performance advantages over the standard

Check warning on line 23 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Stable)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`

Check warning on line 23 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Nightly)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`
//! k-d tree, for situations where the tree does not need to be modified after creation
//!
//! Kiddo is ideal for super-fast spatial / geospatial lookups and nearest-neighbour / KNN
Expand Down Expand Up @@ -76,8 +76,8 @@
//! The crate exposes the following features:
//! * **serialize** - serialization / deserialization via [`Serde`](https://docs.rs/serde/latest/serde/)
//! * **serialize_rkyv** - zero-copy serialization / deserialization via [`Rkyv`](https://docs.rs/rkyv/latest/rkyv/)
//! * **immutable** - to use [`ImmutableKdTree`](`float::kdtree::ImmutableKdTree`)
//! * **simd** - enables some hand written SIMD and pre-fetch intrinsics code within [`ImmutableKdTree`](`float::kdtree::ImmutableKdTree`) that may improve performance (currently only on nearest_one with `f64`)
//! * **immutable** - to use [`ImmutableKdTree`](`immutable::float::kdtree::ImmutableKdTree`)

Check warning on line 79 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Stable)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`

Check warning on line 79 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Nightly)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`
//! * **simd** - enables some hand written SIMD and pre-fetch intrinsics code within [`ImmutableKdTree`](`immutable::float::kdtree::ImmutableKdTree`) that may improve performance (currently only on nearest_one with `f64`)

Check warning on line 80 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Stable)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`

Check warning on line 80 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Lint (Nightly)

unresolved link to `immutable::float::kdtree::ImmutableKdTree`

#[macro_use]
extern crate doc_comment;
Expand Down
Loading