| 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 | { |
no test coverage detected