Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <ShortestPathBenchmark.h>
Benchmarks Shortest Path algorithms.
Benchmarks Shortest Path algorithms and add time series to a LineChart.
One can also set a maximum time spent on a particular run using setTimeCap().
The Shortest Path algorithms must have for prototype:
void (*spalgo)(const GraphAdjList<int, OSMVertex, double>& gr, int source, std::unordered_map<int, double>& distance, std::unordered_map<int, int>& parent);
and can be passed to the run function for being benchmarked. A typical use would look something like
Public Member Functions | |
ShortestPathBenchmark (LineChart &p) | |
void | run (std::string algoName, void(*spalgo)(const GraphAdjList< int, OSMVertex, double > &gr, int source, std::unordered_map< int, double > &distance, std::unordered_map< int, int > &parent)) |
benchmark one implementation More... | |
Public Member Functions inherited from bridges::benchmark::GraphBenchmark | |
void | setTimeCap (double cap_in_s) |
sets an upper bound to the time of a run. More... | |
double | getTimeCap () const |
Return time limit of a run. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from bridges::benchmark::GraphBenchmark | |
GraphBenchmark () | |
std::tuple< long, long > | generateWikidataMovieActor (int yearmin, int yearmax, GraphAdjList< std::string > &moviegraph) |
std::string | highestDegreeVertex (GraphAdjList< std::string > &gr) |
template<typename GraphType > | |
long | countVertices (const GraphType &gr) |
template<typename GraphType > | |
long | countEdges (const GraphType &gr) |
Protected Attributes inherited from bridges::benchmark::GraphBenchmark | |
double | time_cap |
|
inline |
|
inline |
benchmark one implementation
algoName | screen name of the algorithm to be used in the visualization |
spalgo | pointer to the sorting function to benchmark |