gudhi-devel
gudhi-devel copied to clipboard
choose_n_farthest_points number type
choose_n_farthest_points
currently hardcodes a number type of double
. I didn't try, but I assume it would fail if we tried to run in on Epeck_d points.
Euclidean_distance
manages to be generic, and I think we should do the same for choose_n_farthest_points
.
If I have a look to https://github.com/GUDHI/gudhi-devel/blob/7e05e915adc1be285e04eb00d3ab7ba1b797f38d/src/Subsampling/include/gudhi/choose_n_farthest_points.h#L65-L74
DistanceOutputIterator
is an output iterator, which means DistanceOutputIterator::value_type
is not known (cf. std::back_insert_iterator).
Point_range
is a range over CGAL points (Epick_d or Epeck_d), so we can have access to Point_range::value_type
(will be a Point_d), but not to Point_range::value_type::FT
(Point_range::value_type::FT_
is private).
dist_to_L
should be a std::vector< FT >
, but I don't know how to get this type, maybe by using decltype
on a "fake" distance computation.
https://github.com/GUDHI/gudhi-devel/blob/7e05e915adc1be285e04eb00d3ab7ba1b797f38d/src/Subsampling/include/gudhi/choose_n_farthest_points.h#L93
Finally, as this comment claims, Epeck_d::FT
has no infinity value, but this is quite convenient in our case to prevent the user the distance was not computed. We have to find how do so differently.
A first attempt, that is not satisfying enough in this branch