1 #ifndef PAGERANK_BENCHMARK_H 2 #define PAGERANK_BENCHMARK_H 58 void run(std::string algoName,
60 std::unordered_map<std::string, double>& out)) {
61 std::vector<double> time;
62 std::vector<double> vtxCounts;
63 std::vector<double> edgeCounts;
65 for (
int years = 0; years < 120; years = 1.2 * years + 1) {
66 int year = 2019 - years;
67 std::cerr <<
"*" << std::flush;
71 std::tie(vertexCount, edgeCount) = generateWikidataMovieActor(year, 2019, graph);
73 std::unordered_map<std::string, double> pr;
75 std::chrono::time_point<std::chrono::system_clock> start = std::chrono::system_clock::now();
79 std::chrono::time_point<std::chrono::system_clock> end = std::chrono::system_clock::now();
81 std::chrono::duration<double> elapsed_seconds = end - start;
84 time.push_back ((
double)elapsed_seconds.count() );
85 vtxCounts.push_back ( (
double)vertexCount );
86 edgeCounts.push_back ( (
double)edgeCount );
88 if (elapsed_seconds.count() > time_cap) {
94 std::cerr <<
"\n" << std::flush;
void setXLabel(string xaxisName)
Change the label for the X-axis.
Definition: LineChart.h:184
This class provides methods to represent adjacency list based graphs.
Definition: Element.h:19
Show series of data or functions using a line chart.
Definition: LineChart.h:43
void setXData(string series, vector< double > xdata)
Changes the X data for a series.
Definition: LineChart.h:217
Base class for a variety of graph based benchmark.
Definition: GraphBenchmark.h:15
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
PageRankBenchmark(LineChart &p)
Definition: PageRankBenchmark.h:45
void run(std::string algoName, void(*pralgo)(const GraphAdjList< std::string > &gr, std::unordered_map< std::string, double > &out))
benchmark one implementation
Definition: PageRankBenchmark.h:58
void setYData(string series, vector< double > ydata)
Changes the Y data for a series.
Definition: LineChart.h:237
void setYLabel(string yaxisName)
Change the label for the Y-axis.
Definition: LineChart.h:166
Benchmarks Page Rank algorithms.
Definition: PageRankBenchmark.h:40