MCPcopy Create free account
hub / github.com/BirolLab/abyss / passGraphStatsVal

Function passGraphStatsVal

Graph/GraphUtil.h:68–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66/** Pass graph statistics -- values only . */
67template <typename Graph>
68std::vector<int> passGraphStatsVal(const Graph& g)
69{
70#if _SQL
71 Histogram h = printHistogram(g);
72 unsigned n = h.size(),
73 n0 = h.count(0),
74 n1 = h.count(1),
75 n234 = h.count(2, 4),
76 n5 = n - (n0 + n1 + n234);
77
78 return make_vector<int>()
79 << num_vertices(g) - num_vertices_removed(g)
80 << num_edges(g)
81 << (int)round(100.0 * n0 / n)
82 << (int)round(100.0 * n1 / n)
83 << (int)round(100.0 * n234 / n)
84 << (int)round(100.0 * n5 / n)
85 << h.maximum();
86#else
87 (void)g;
88 return make_vector<int>();
89#endif
90}
91#endif

Callers 3

readGraphFunction · 0.85
mainFunction · 0.85
buildPathGraphFunction · 0.85

Calls 7

printHistogramFunction · 0.85
num_vertices_removedFunction · 0.85
maximumMethod · 0.80
num_verticesFunction · 0.70
num_edgesFunction · 0.70
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected