random(T const, T const, std::mt19937)¶
-
ActionDigraph
libsemigroups::ActionDigraph
::
random
(T const nr_nodes, T const out_degree, std::mt19937 mt = std::mt19937(std::random_device()()))¶ Constructs a random ActionDigraph from
mt
with the specified number of nodes and out-degree.- Complexity
\(O(mn)\) where
m
is the number of nodes, andn
is the out-degree of the digraph.- Parameters
nr_nodes
: the number of nodesout_degree
: the out-degree of every nodemt
: a std::mt19937 used as a random source (defaults to: std::mt19937(std::random_device()()))
- Exceptions
LibsemigroupsException
: if any of the following hold:nr_nodes
is less than2
out_degree
is less than2