mosp LEDA Extension Package
0.7
|
An instance generator class. More...
#include <generator.h>
Public Member Functions | |
StructuredInstanceGenerator (int apps, int posts, int seed=default_seed) | |
Construct a structured random instance. More... | |
virtual | ~StructuredInstanceGenerator () |
Destructor. | |
void | GenerateGML (std::ostream &o) |
Generate a random structured instance in GML format. More... | |
void | GenerateGraph (leda::graph &G, leda::list< leda::node > &A, leda::list< leda::node > &B, leda::node_map< int > &capacity, leda::edge_map< int > &rank) |
Generate a random structured instance. More... | |
int | NumPosts () const |
int | NumApplicants () const |
An instance generator class.
mosp::StructuredInstanceGenerator::StructuredInstanceGenerator | ( | int | apps, |
int | posts, | ||
int | seed = default_seed |
||
) |
Construct a structured random instance.
apps | The number of applicants ![]() |
posts | The number of posts ![]() |
seed | A seed for the random number generator |
void mosp::StructuredInstanceGenerator::GenerateGML | ( | std::ostream & | o | ) |
Generate a random structured instance in GML format.
o | Output the GML graph in this stream |
void mosp::StructuredInstanceGenerator::GenerateGraph | ( | leda::graph & | G, |
leda::list< leda::node > & | A, | ||
leda::list< leda::node > & | B, | ||
leda::node_map< int > & | capacity, | ||
leda::edge_map< int > & | rank | ||
) |
Generate a random structured instance.
G | The graph to return |
A | The list of applicants |
B | The list of posts |
capacity | The node capacities |
rank | The edge ranks |
|
inline |
Number of applicants that the resulting instance will have.
|
inline |
Number of posts that the resulting instance will have.