mosp LEDA Extension Package  0.7
Public Member Functions | List of all members
mosp::StructuredInstanceGenerator Class Referenceabstract

An instance generator class. More...

#include <generator.h>

Inheritance diagram for mosp::StructuredInstanceGenerator:
Inheritance graph
[legend]

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
 

Detailed Description

An instance generator class.

Constructor & Destructor Documentation

mosp::StructuredInstanceGenerator::StructuredInstanceGenerator ( int  apps,
int  posts,
int  seed = default_seed 
)

Construct a structured random instance.

Parameters
appsThe number of applicants $n$
postsThe number of posts $m$
seedA seed for the random number generator

Member Function Documentation

void mosp::StructuredInstanceGenerator::GenerateGML ( std::ostream &  o)

Generate a random structured instance in GML format.

Parameters
oOutput 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.

Parameters
GThe graph to return
AThe list of applicants
BThe list of posts
capacityThe node capacities
rankThe edge ranks
int mosp::StructuredInstanceGenerator::NumApplicants ( ) const
inline

Number of applicants that the resulting instance will have.

int mosp::StructuredInstanceGenerator::NumPosts ( ) const
inline

Number of posts that the resulting instance will have.