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

Method approxMemSize

Graph/HashGraph.h:52–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 HashGraph() : m_numEdges(0) {}
51
52 size_t approxMemSize()
53 {
54 size_t pointer_size = sizeof(void *);
55 size_t entry_bytes = m_numEdges * sizeof(vertex_descriptor);
56 size_t filled_bucket_bytes = m_vertices.size() *
57 (sizeof(typename VertexMap::value_type) +
58 3 * pointer_size);
59 size_t empty_bucket_bytes = size_t((1.0 - m_vertices.load_factor()) *
60 m_vertices.bucket_count() * pointer_size);
61 return entry_bytes + filled_bucket_bytes + empty_bucket_bytes;
62 }
63
64 void set_vertex_color(const vertex_descriptor& v, const std::string& color)
65 {

Callers 1

approxMemUsageMethod · 0.80

Calls 2

bucket_countMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected