2 #include <lemon/smart_graph.h>
5 #include <lemon/graph_to_eps.h>
13 template<
typename Graph>
14 int shape(
typename Graph::Node)
31 int main(
int argc,
char **argv)
39 cout <<
"Graph generation time: " << timer.
elapsed() << endl;
42 int n = countNodes(g);
43 cout <<
"Total nodes: " << n << endl;
44 cout <<
"Total edges: " << countEdges(g) << endl;
45 cout <<
"Radius squared: " << atof(argv[2]) << endl;
46 cout <<
"Random seed: " << argv[3] << endl;
49 cout <<
"Using greedy nearest:" << endl;
52 cout <<
"Creation elapsed time: " << greedyNearest.
creationTime() << endl;
54 cout <<
"Initialisation elapsed time: " << greedyNearest.
initTime() << endl;
57 cout <<
"Algorithm running time: " << greedyNearest.
runTime() << endl;
58 cout <<
"Max colours: " << greedyNearest.maxK() << endl;
59 cout <<
"Colours used: " << greedyNearest.totalColours() << endl;
60 cout <<
"LCA value: " << greedyNearest.lcaValue() << endl;
63 cout <<
"Could not find a solution!" << endl;
68 cout <<
"Using greedy least cost:" << endl;
71 cout <<
"Creation elapsed time: " << greedyLeastCost.
creationTime() << endl;
72 greedyLeastCost.
init();
73 cout <<
"Initialisation elapsed time: " << greedyLeastCost.
initTime() << endl;
76 cout <<
"Algorithm running time: " << greedyLeastCost.
runTime() << endl;
77 cout <<
"Max colours: " << greedyLeastCost.maxK() << endl;
78 cout <<
"Colours used: " << greedyLeastCost.totalColours() << endl;
79 cout <<
"LCA value: " << greedyLeastCost.lcaValue() << endl;
82 cout <<
"Could not find a solution!" << endl;
88 graphToEps(g, argv[4])
92 .edgeWidthScale(.0005)
virtual void generate()
Generate graph.
double runTime()
Retrieve the duration of running the algorithm.
Class defining random geometric graphs.
virtual MinLCAStatus run()
Run the algorithm.
int main(int argc, char **argv)
Main function.
Contains definition for RandomGeometric graphs.
Solution has been found after running.
Default namespace Default namespace for MinLCA algorithms.
Graph & init(int n, double radSq)
Initialise the generator.
Class for timing MinLCA algorithms.
Functions for reading graphs and getting graph properties.
double initTime()
Retrieve the duration of initialising the algorithm.
double creationTime()
Retrieve the duration of instantiating the algorithm class.
Contains the definitions for timing MinLCA algorithms.
double elapsed() const
Retrieve elapsed time.
void init(Args &&...args)
Reset the data structures of the algorithm.
const Coords & coords() const
Retrieve all the coordinates.
Namespace for util functions and classes.