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

#include <PageRankBenchmark.h>

Inheritance diagram for bridges::benchmark::PageRankBenchmark:
bridges::benchmark::GraphBenchmark

Detailed Description

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

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

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
 

Constructor & Destructor Documentation

◆ PageRankBenchmark()

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

Member Function Documentation

◆ run()

void bridges::benchmark::PageRankBenchmark::run ( std::string  algoName,
void(*)(const GraphAdjList< std::string > &gr, std::unordered_map< std::string, double > &out)  pralgo 
)
inline

benchmark one implementation

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

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