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
m
is the number of nodes, andn
is 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_nodes
is less than2
out_degree
is less than2
number_of_edges
exceeds the product ofnumber_of_nodes
andout_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
m
is the number of nodes, andn
is 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_nodes
is less than2
out_degree
is 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
m
is the number of nodes, andn
is 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_nodes
is less than2
out_degree
is less than2
number_of_edges
exceeds the product ofnumber_of_nodes
andout_degree
number_of_edges
exceeds the product ofnumber_of_nodes
andnumber_of_nodes
- 1 divided by 2.