Browse Source

corrected bug in util/Graph

remotes/origin/error-reporting
alexge50 3 years ago
parent
commit
43a36b648d
  1. 5
      util/include/Graph.h

5
util/include/Graph.h

@ -31,14 +31,15 @@ public:
void removeNode(const NodeType& key)
{
auto id = m_map[key];
auto index = graphLookup(id);
for(auto& neighbour: m_graph[id].in)
for(auto& neighbour: m_graph[index].in)
{
auto neighbourIndex = graphLookup(neighbour);
removeNeighbour(m_graph[neighbourIndex].out, id);
}
for(auto& neighbour: m_graph[id].out)
for(auto& neighbour: m_graph[index].out)
{
auto neighbourIndex = graphLookup(neighbour);
removeNeighbour(m_graph[neighbourIndex].in, id);

Loading…
Cancel
Save