From 1a2ebe67b6c01de526d0c3b565f3f4f8038c1c81 Mon Sep 17 00:00:00 2001 From: randogoth Date: Tue, 26 Mar 2024 11:55:30 +0200 Subject: [PATCH] fixes, pub fn --- Cargo.toml | 1 - src/lib.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b73677e..041b19a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" [lib] name = "xenobalanus" -crate-type = ["cdylib"] [dependencies] delaunator = "1.0.2" diff --git a/src/lib.rs b/src/lib.rs index 8b5b7e3..558b2a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,7 @@ pub fn delaunay(points: &Vec>) -> Vec { result.triangles } -fn preprocess(points: &[Point], triangles: &[usize], types: usize) -> GeometryData { +pub fn preprocess(points: &[Point], triangles: &[usize], types: usize) -> GeometryData { let geometry_data = Arc::new(Mutex::new(GeometryData::new())); triangles.par_chunks(3).enumerate().for_each(|(index, tri_idx)| { @@ -138,7 +138,7 @@ fn preprocess(points: &[Point], triangles: &[usize], types: usize) -> Geome Arc::try_unwrap(geometry_data).unwrap().into_inner().unwrap() } -fn delfin( +pub fn delfin( geometry_data: &GeometryData, min_area: f32, min_distance: f32, @@ -236,7 +236,7 @@ fn delfin( } -fn dtscan( +pub fn dtscan( geometry_data: &GeometryData, min_pts: usize, max_closeness: f32,