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

Method add_edge

Graph/HashGraph.h:122–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 std::pair<edge_descriptor, bool>
123 add_edge(const vertex_descriptor& u, const vertex_descriptor& v)
124 {
125 bool edgeInserted = false;
126 typename VertexMap::iterator i = m_vertices.find(u);
127 if (i == m_vertices.end())
128 i = init_vertex(u);
129 VertexList& successors = i->second;
130 if (std::find(successors.begin(), successors.end(), v) == successors.end()) {
131 successors.push_back(v);
132 m_numEdges++;
133 edgeInserted = true;
134 }
135 i = m_vertices.find(v);
136 if (i == m_vertices.end())
137 init_vertex(v);
138 return std::pair<edge_descriptor, bool>
139 (edge_descriptor(u, v), edgeInserted);
140 }
141};
142
143namespace boost {

Callers 3

processGraphFunction · 0.45
copy_out_edgesFunction · 0.45
add_edgeFunction · 0.45

Calls 5

findFunction · 0.85
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected