This test program compares MTA performance of various traversals of a C compressed sparse row graph representation. More...
#include <cstdlib>
#include <climits>
#include <mtgl/static_graph_adapter.hpp>
#include <mtgl/adjacency_list_adapter.hpp>
#include <mtgl/st_connectivity.hpp>
#include <mtgl/sssp_deltastepping.hpp>
#include <mtgl/st_search.hpp>
#include <mtgl/duplicate_adapter.hpp>
#include <mtgl/dynamic_array.hpp>
Data Structures | |
class | in_degree_adj_visitor< graph > |
Typedefs | |
typedef static_graph_adapter < directedS > | Graph |
typedef graph_traits< Graph > ::size_type | size_type |
Functions | |
void | compute_in_degree (static_graph< directedS > *g, size_type *in_degree) |
void | compute_in_degree2 (static_graph< directedS > *g, size_type *in_degree) |
void | compute_in_degree (Graph &g, size_type *in_degree) |
int | main (int argc, char *argv[]) |
This test program compares MTA performance of various traversals of a C compressed sparse row graph representation.
The representation stores out-edges, and our sample task is to compute the in-degree of each vertex by traversing the adjacency structure and therefore touching all of the graph.
Unfortunately, this isn't a compelling teaching example since we could compute the information with traversing adjacency lists for this structure. We'll proceed anyway, as touching the whole graph is involved in lots of ranking algorithms.