Crates.io | naturalneighbor |
lib.rs | naturalneighbor |
version | 1.2.2 |
source | src |
created_at | 2023-10-20 18:16:09.172664 |
updated_at | 2024-01-26 09:07:07.382893 |
description | 2D Natural Neighbor Interpolation (NNI) library for Rust. |
homepage | |
repository | |
max_upload_size | |
id | 1009271 |
size | 64,649 |
2D Natural Neighbor Interpolation (NNI) library for Rust.
The implementation of this library is based on 'A Fast and Accurate Algorithm for Natural Neighbor Interpolation' by G.W. Lucas.
This is a subproject for the fastlem.
[dependencies]
naturalneighbor = "1.2.2"
Benchmarking is available with criterion.
$ cargo bench
Estimated time per 1 interpolation for 2D NNI with 1000, 10000, and 100000 sites.
CPU: 11th Gen Intel i7-11390H (8) @ 5.000GHz
Version: 1.2.0
N=1000 | N=10000 | N=100000 | |
---|---|---|---|
Estimated time | 617.64 ns | 938.76 ns | 1.2598 µs |
See the API documentation for details.
There are some examples in the examples
directory that are useful for understanding how to use this library.
Note that the computation of this library is much faster for the --release
build.
$ cargo run --example color
Contributions are welcome.
Feel free to open an issue or pull request if you have any problems or suggestions.
MIT
Copyright (c) 2023 Teruki TADA