GUDHI/gudhi-devel

Mix of random generators in tangential complex

mglisse opened this issue · 0 comments

CGAL::Random_points_in_ball_d<Tr_bare_point> tr_point_in_ball_generator(
m_intrinsic_dim, m_random_generator.get_double(0., max_perturb));

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.)