random

static ActionDigraph libsemigroups::ActionDigraph::random(T m, T n, std::mt19937 mt = std::mt19937())

Constructs a random ActionDigraph from mt with the specified number of nodes and out-degree.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

Complexity

\(O(mn)\) where m is the number of nodes, and n is the out-degree of the digraph.

Parameters
  • m: the number of nodes

  • n: the out-degree of every node

  • mt: a std::mt19937 used as a random source.