The GUDHI library is a generic open source C++ library, with a Python interface, for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
A new helper class Gudhi::Random that can be constructed with a user given seed, or from a random seed if not given.
This could help for #795 resolution.
The use of Gudhi::Random everywhere std::mt19937 is used in legacy code is not part of this PR, but can be done after on a different PR.
The purpose of this PR is to provide 2 new methods to construct random graph:
random_edges that returns X% (cf.density argument) of permuted vertices (cf. nb_vertices argument), seen as a list of edges
simplex_tree_random_flag_complex that fills a Simplex_tree with random_edges, but also with random filtration values
Maybe simplex_tree_random_flag_complex is a bit slow:
Random flag complex with 5000 vertices and 1881350 simplices
real 0m42,729s
user 0m42,715s
sys 0m0,012s
A new helper class
Gudhi::Random
that can be constructed with a user given seed, or from a random seed if not given. This could help for #795 resolution.The use of
Gudhi::Random
everywherestd::mt19937
is used in legacy code is not part of this PR, but can be done after on a different PR.The purpose of this PR is to provide 2 new methods to construct random graph:
random_edges
that returns X% (cf.density argument) of permuted vertices (cf. nb_vertices argument), seen as a list of edgessimplex_tree_random_flag_complex
that fills a Simplex_tree withrandom_edges
, but also with random filtration valuesMaybe
simplex_tree_random_flag_complex
is a bit slow:But this is not what we want to benchmark.