[Small Feature] Point Set Clustering#4568
Conversation
|
Precisely because clustering is such a well-known and wide topic, it should be clear what algorithm you are using. Are you just returning the connected components of a union of balls? The generic name "clustering" may give users a lot of expectations. |
|
The documentation says:
How can I make it clearer? |
|
simply connected clusters -> connected components nearest neighbor graph: that has a precise definition. Neighborhood graph is more vague. I've seen the graph with all pairs at distance less than r called the r-Rips graph, proximity graph, maybe also some name with "ball" in it, not sure about it, it probably doesn't have a canonical name. Anyway, a sentence explaining what it does cannot hurt. |
|
I suggest to add an image for a 2D point set (then it is planar which is better for html). |
|
I uploaded a new version of the doc following the different reviews I got. Following a discussion with @afabri, I removed the parameter |
1645786 to
0e67264
Compare
|
@afabri @sgiraudot bump |
|
Successfully tested in https://cgal.geometryfactory.com/CGAL/testsuite/results-5.1-Ic-139.shtml. |
|
@sgiraudot could you please update |
| template <typename Range, typename Pmap> | ||
| CGAL::Iterator_range<typename boost::transform_iterator<CGAL::Property_map_to_unary_function<Pmap>, | ||
| typename Range::iterator> > | ||
| make_transform_range_from_property_map (Range& range, Pmap pmap) |
There was a problem hiding this comment.
I would rename that to transform_range_[with/using]_property_map()
Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp
Outdated
Show resolved
Hide resolved
Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp
Outdated
Show resolved
Hide resolved
Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp
Outdated
Show resolved
Hide resolved
|
Successfully tested in https://cgal.geometryfactory.com/CGAL/testsuite/results-5.1-Ic-152.shtml |
Rationale
Identifying clusters of locally connected points in a point set is a pretty standard procedure. Although the algorithm is pretty simple and straightforward, CGAL does not provide any API to such an algorithm, which seems like a missing feature.
(In my personal experience, I used several times this algorithm and kept copy-pasting the code, so I figured it belonged in the Point Set Processing package.)
This small features adds a clustering algorithm to Point Set Processing.
Summary of API changes
A new function
CGAL::cluster_point_set()is provided, along with a new named parameteradjacencies.License and copyright ownership
GPL, GeometryFactory
CHANGES.md
(todo)
Submission
Version 1 (outdated)
User manualReference manualVersion 2
Status