[Lemon-commits] [lemon_svn] ladanyi: r2725 - hugo/trunk/gui
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:54:46 CET 2006
Author: ladanyi
Date: Thu Apr 27 14:20:09 2006
New Revision: 2725
Modified:
hugo/trunk/gui/mapstorage.cc
Log:
filter loop edges
Modified: hugo/trunk/gui/mapstorage.cc
==============================================================================
--- hugo/trunk/gui/mapstorage.cc (original)
+++ hugo/trunk/gui/mapstorage.cc Thu Apr 27 14:20:09 2006
@@ -268,6 +268,7 @@
if (*it == "label")
{
//std::cout << "read id edgemap" << std::endl;
+ read_edge_id = true;
}
else
{
@@ -366,6 +367,20 @@
}
}
+ // filter loop edges
+ for (EdgeIt e(graph); e != INVALID; ++e)
+ {
+ if (graph.source(e) == graph.target(e))
+ {
+ std::cerr << "Removed loop edge " << (*edgemap_storage["label"])[e]
+ << " (from " << (*nodemap_storage["label"])[graph.source(e)]
+ << ", to " << (*nodemap_storage["label"])[graph.target(e)] << ")."
+ << std::endl;
+
+ graph.erase(e);
+ }
+ }
+
return 0;
}
More information about the Lemon-commits
mailing list