Graph generator for generating a random simple graph with exactly the given degree sequence.
Public Functions
-
ConfigurationModel(const std::vector<count> &sequence)
Initializes the configuration model generator with the given degree sequence sequence.
- Parameters:
sequence – std::vector<count> with the input sequence of degrees.
-
virtual Graph generate() override
Generates a graph according to the configuration model.
- Throws:
std::runtime_error – If the sequence cannot be generated.
- Returns:
The generated graph