Mix of random generators in tangential complex
mglisse opened this issue · 0 comments
gudhi-devel/src/Tangential_complex/include/gudhi/Tangential_complex.h
Lines 1582 to 1583 in c5ab9de
Here we have our own instance m_random_generator
of CGAL::Random
used to generate one number, but then Random_points_in_ball_d
uses CGAL's instance (accessible as CGAL::get_default_random()
). I think it would be more consistent to use the same for both, so either write CGAL::get_default_random().get_double
here (and remove the useless m_random_generator
), or pass m_random_generator
as argument to the constructor of Random_points_in_ball_d
.
(It is also a bit strange to generate a random radius and then a random point in a ball of that radius. It corresponds to a distribution on the ball of max radius that is heavier towards the center, which can make sense, but I don't see any comment about this, confirming that it is done on purpose, and explaining why this is the right formula.)