Comments (4)
So we already have nearest
by count and within
by radius, and the suggestion seems to be a combination of them.
Any thoughts how we can combine them with a flexible interface instead of adding another method?
Currently not actively working on this - if you're interested, a PR would be great!
from kdtree-rs.
If it is possible to modify the function signature (adding the new parameter) the modified function should be:
pub fn nearest<F>(
&self,
point: &[A],
num: usize,
radius: A,
distance: &F,
)
Not sure if a good idea to change the API. That was the reason to propose a new method instead. A simple solution could be implementing a new nearest_with_radius and the old nearest calls to nearest_with_radius to avoid code duplication:
pub fn nearest<F>(
&self,
point: &[A],
num: usize,
radius: A,
distance: &F,
) -> Result<Vec<(A, &T)>, ErrorKind> {
nearest_with_radius(self,point,num, A::infinity(), distance)
}
I can make PR but I want to discuss first with you the proposed solution.
from kdtree-rs.
Thanks @exepulveda I'm supportive of merging them into one interface - it'd be a breaking change & we will just follow semantic versioning bumping to 0.7
from kdtree-rs.
Closing stale issue. Please re-open as needed.
from kdtree-rs.
Related Issues (19)
- Relicense under dual MIT/Apache-2.0 HOT 1
- Question: Why swap_remove? HOT 1
- Support f32 not only f64
- Expose information related to tree. HOT 2
- `within` has a `ridius` argument
- Add documentation HOT 1
- Stack overflow in add_to_bucket HOT 2
- Support Clone HOT 2
- `split_value` as an output vector HOT 1
- mention nearest neighbors in readme HOT 1
- remove points after add? HOT 1
- What is a computational complexity of queuing nearest point? HOT 2
- The library doesn't compile for ARM64 HOT 1
- Do you have a plan to upgrade the version of crate ? HOT 1
- Stack overflow in add_to_bucket HOT 2
- Program stucks when removing non-existing points or points at the same place HOT 1
- Release a new Version HOT 2
- Question about U on kdtre.rs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kdtree-rs.