|  | Bridges-C++ 3.5.0
    Bridges(C++ API) | 
Benchmarks Breadth First Search algorithms. More...
#include <BFSBenchmark.h>
 
  
| Public Member Functions | |
| BFSBenchmark (LineChart &p) | |
| void | run (std::string algoName, void(*bfsalgo)(const GraphAdjList< std::string > &gr, std::string root, std::unordered_map< std::string, int > &level, std::unordered_map< std::string, std::string > &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 | 
Benchmarks Breadth First Search algorithms.
Benchmarks BFS algorithms and add time series to a LineChart.
One can also set a maximum time spent on a particular run using setTimeCap().
The BFS algorithms must have for prototype:
void (*bfsalgo)(const GraphAdjList<std::string>& gr, std::string root, std::unordered_map<std::string, int>& level, std::unordered_map<std::string, std::string>& parent);
and can be passed to the run function for being benchmarked. A typical use would look something like
| 
 | inline | 
| 
 | inline | 
benchmark one implementation
| algoName | screen name of the algorithm to be used in the visualization | 
| bfsalgo | pointer to the sorting function to benchmark |