| Crates.io | geosteiner |
| lib.rs | geosteiner |
| version | 0.1.0 |
| created_at | 2025-03-24 15:17:15.499664+00 |
| updated_at | 2025-03-24 15:17:15.499664+00 |
| description | compute Euclidean and recitlinear Steiner trees using the geosteiner C library |
| homepage | |
| repository | https://github.com/CinusMinus/geosteiner |
| max_upload_size | |
| id | 1603881 |
| size | 3,262,688 |
Compute Euclidean and rectilinear minimum Steiner trees using safe bindings to the geosteiner C library.
The library provides two functions to compute the Euclidean and rectilinear minimum Steiner trees.
use geosteiner::euclidean_steiner_tree;
fn main() {
let terms = [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 1.0]];
let tree = euclidean_steiner_tree(&terms);
println!("found tree with length {}", tree.length);
println!("steiner points: ");
println!("{:.2?}", tree.steiner_points);
println!("edges: ");
println!("{:?}", tree.edges);
println!("length: {:.2}", tree.length);
}
This crate is just a wrapper around the geosteiner C library. While care has been taken to ensure that all ffi calls are safe, the underlying C code may still contain bugs that could lead to memory unsafety. We take no responsibility for the geosteiner C library and state that its authors are unaffiliated with this crate.
Unfortunately, geosteiner itself is licensed under CC-BY-NC, so these bindings are limited to the same license.