Static member functions¶
This page contains information about the static member functions for the ActionDigraph class.
-
static inline ActionDigraph libsemigroups::ActionDigraph::random(T number_of_nodes, T out_degree, T number_of_edges, std::mt19937 mt = std::mt19937(std::random_device()()))¶
Construct a random digraph from number of nodes, edges, and out-degree.
- Complexity
At least \(O(mn)\) where
mis the number of nodes, andnis the out-degree of the digraph.
- Parameters:
number_of_nodes – the number of nodes
out_degree – the out-degree of every node
number_of_edges – the out-degree of every node
mt – a std::mt19937 used as a random source (defaults to: std::mt19937(std::random_device()()))
- Throws:
LibsemigroupsException – if any of the following hold:
number_of_nodesis less than2out_degreeis less than2number_of_edgesexceeds the product ofnumber_of_nodesandout_degree
-
static inline ActionDigraph libsemigroups::ActionDigraph::random(T number_of_nodes, T out_degree, std::mt19937 mt = std::mt19937(std::random_device()()))¶
Construct a random digraph from number of nodes and out-degree.
- Complexity
\(O(mn)\) where
mis the number of nodes, andnis the out-degree of the digraph.
- Parameters:
number_of_nodes – the number of nodes
out_degree – the out-degree of every node
mt – a std::mt19937 used as a random source (defaults to: std::mt19937(std::random_device()()))
- Throws:
LibsemigroupsException – if any of the following hold:
number_of_nodesis less than2out_degreeis less than2
-
static inline ActionDigraph libsemigroups::ActionDigraph::random_acyclic(T number_of_nodes, T out_degree, T number_of_edges, std::mt19937 mt = std::mt19937(std::random_device()()))¶
Construct a random acyclic digraph from number of nodes, edges, and out-degree.
- Complexity
At least \(O(mn)\) where
mis the number of nodes, andnis the out-degree of the digraph.
- Parameters:
number_of_nodes – the number of nodes
out_degree – the out-degree of every node
number_of_edges – the out-degree of every node
mt – a std::mt19937 used as a random source (defaults to: std::mt19937(std::random_device()()))
- Throws:
LibsemigroupsException – if any of the following hold:
number_of_nodesis less than2out_degreeis less than2number_of_edgesexceeds the product ofnumber_of_nodesandout_degreenumber_of_edgesexceeds the product ofnumber_of_nodesandnumber_of_nodes- 1 divided by 2.