Comments (9)
Hi Ivan,
Thanks for your interest in the crate and your consideration for the userbase! I'd be happy to review any PRs from you on any topic, and I'll try my best to review them quickly, even same-day when possible.
Perhaps you could tell me a bit more about the changes you're interested in making? I don't personally know of anyone using this crate, so it would be fun to hear about possible applications.
from quadtree.
from quadtree.
That's pretty interesting, thanks for the insight.
-
For overlapping / non overlapping regions, I think you could construct
Quadtree
with some settings struct and then check for collision at insert time. I would welcome PRs in this direction. -
With regard to entry API ergonomics, I have some APIs with
get()
and the returnedEntry
struct which mirror somewhat theentry
patterns I observed instd::collections::HashMap
. What sorts of changes should we make here? I would also welcome PRs in this direction.
from quadtree.
Side question: why does Area use Builder pattern, and what does Quadtree's with_anchor
constructor does? Is it that you can omit anchor from Area if working with a Quadtree that has anchor set?
from quadtree.
Area
uses the builder pattern because I personally find it reassuring to know that I haven't forgotten to set either the anchor or the dimensions of an area. We usederive_builder
for this. Put another way - when you insert an area, you need to supply both its width/height and an x/y location in the cartesian plane. But I found myself forgetting to supply one or another in tests and at callsites.new_with_anchor
generates a new Quadtree whose anchor isn't necessarily the origin,(0,0)
on the cartesian plane. It doesn't let you omit the anchor from anArea
.
It sounds like I might be missing some documentation on Area
?
from quadtree.
from quadtree.
The thing that's missing from Entry
as compared to std::collections
is the empty variant, and the associated ability to insert in it.
from quadtree.
The thing that's missing from
Entry
as compared tostd::collections
is the empty variant, and the associated ability to insert in it.
This sounds like a good design improvement to me. Like I mentioned above, I would be happy to review any PRs which address ergonomics. NB: we would have to bump the major version since this would be a breaking change.
from quadtree.
@JohnDowson: I noticed you've begun work (in #17, #18) on some of the features we've discussed here: (a) making overlapping / nonoverlapping regions, (b) different ergonomics for Entry
, and maybe (c) cleaning up how we treat anchors.
I am going to close this issue -- please take out further more granular issues for each of the changes you want to make. Thanks! :)
from quadtree.
Related Issues (12)
- Stack overflow in Query::next HOT 3
- Improve performance of `HandleIter` HOT 1
- AreaBuilder not fond in version "0.1.2" HOT 1
- Panic with depths greater than 31 HOT 1
- Why are you using a hashmap ? HOT 2
- Quadtree::delete_by_handle is useless, unless the .handle() in entry is made public HOT 1
- Feature Request: Add Serde Feature Flag HOT 3
- Create new crates.io release HOT 1
- Noob question regarding region sizes HOT 2
- Query and Entry API changes HOT 11
- Is there any way to get the inner tree? HOT 1
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 quadtree.