mosp LEDA Extension Package
0.7
|
An variable size "exponential" instance generator. More...
#include <generator.h>
Public Member Functions | |
VSExponentialInstanceGenerator (int apps, int posts, double Density, double lambda) | |
Create a new generator. More... | |
VSExponentialInstanceGenerator (int apps, int posts, double Density, double lambda, int seed) | |
Create a new generator. More... | |
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 variable size "exponential" instance generator.
The variable size random instance generator, while very similar to the fixed size generator , tries to capture a slightly different situation. Let be a strict total order, as in the previous generator. We again partition the posts into clusters of exponentially increasing size. Now, however, clusters are similar but different for each applicant.
The generator has the following parameters: (a) number of applicants and posts
, (b) instance density parameter
, and (c) parameter
controlling the distribution of posts into clusters. We construct the preference list of an applicant
as follows. Our goal is to add an edge from
to the first
posts. We initially add edge
with rank 1. When adding edge
we decide the rank based on the parameter
. We choose with probability
whether to increase the rank by one or use the same rank as edge
.
|
inline |
Create a new generator.
apps | Number of applicants ![]() |
posts | Number of posts ![]() |
Density | Density parameter ![]() |
lambda | Parameter ![]() |
|
inline |
Create a new generator.
apps | Number of applicants ![]() |
posts | Number of posts ![]() |
Density | Density parameter ![]() |
lambda | Parameter ![]() |
seed | A seed for the random number generator |
|
inherited |
Generate a random structured instance in GML format.
o | Output the GML graph in this stream |
|
inherited |
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 |
|
inlineinherited |
Number of applicants that the resulting instance will have.
|
inlineinherited |
Number of posts that the resulting instance will have.