Bridges-C++  3.4.4
Bridges(C++ API)
Public Member Functions | List of all members
bridges::benchmark::ShortestPathBenchmark Class Reference

#include <ShortestPathBenchmark.h>

Inheritance diagram for bridges::benchmark::ShortestPathBenchmark:
bridges::benchmark::GraphBenchmark

Detailed Description

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

LineChart lc;
sb.run("mybfsalgorithm", spalgo);
ShortestPathBenchmark(LineChart &p)
Definition: ShortestPathBenchmark.h:69
Author
Erik Saule
Date
07/21/2019

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
 

Constructor & Destructor Documentation

◆ ShortestPathBenchmark()

bridges::benchmark::ShortestPathBenchmark::ShortestPathBenchmark ( LineChart p)
inline

Member Function Documentation

◆ run()

void bridges::benchmark::ShortestPathBenchmark::run ( std::string  algoName,
void(*)(const GraphAdjList< int, OSMVertex, double > &gr, int source, std::unordered_map< int, double > &distance, std::unordered_map< int, int > &parent)  spalgo 
)
inline

benchmark one implementation

Parameters
algoNamescreen name of the algorithm to be used in the visualization
spalgopointer to the sorting function to benchmark

The documentation for this class was generated from the following file: