1 unstable release
new 0.1.0 | Mar 24, 2025 |
---|
#257 in #geometry
2.5MB
64K
SLoC
Contains (autotools obfuscated code, 185KB) external/geosteiner-5.3/configure, (obscure autoconf code, 15KB) external/geosteiner-5.3/configure.ac
geosteiner bindings
Compute Euclidean and rectilinear minimum Steiner trees using safe bindings to the geosteiner C library.
Usage
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);
}
Safety
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.
License
Unfortunately, geosteiner itself is licensed under CC-BY-NC, so these bindings are limited to the same license.
No runtime deps
~0–2.2MB
~43K SLoC