Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <PageRankBenchmark.h>
Benchmarks Page Rank algorithms.
Benchmarks PageRank algorithms and add time series to a LineChart.
One can also set a maximum time spent on a particular run using setTimeCap().
The PageRank algorithms must have for prototype:
void (*pralgo)(const GraphAdjList<std::string>& gr, std::unordered_map<std::string, double>& pagerank);
and can be passed to the run function for being benchmarked. A typical use would look something like
Public Member Functions | |
PageRankBenchmark (LineChart &p) | |
void | run (std::string algoName, void(*pralgo)(const GraphAdjList< std::string > &gr, std::unordered_map< std::string, double > &out)) |
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 |
pralgo | pointer to the sorting function to benchmark |