COIN-OR::LEMON - Graph Library

Changeset 2065:780e27579198 in lemon-0.x


Ignore:
Timestamp:
04/27/06 14:20:09 (14 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2725
Message:

filter loop edges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mapstorage.cc

    r2063 r2065  
    269269      {
    270270        //std::cout << "read id edgemap" << std::endl;
     271        read_edge_id = true;
    271272      }
    272273      else
     
    367368  }
    368369
     370  // filter loop edges
     371  for (EdgeIt e(graph); e != INVALID; ++e)
     372  {
     373    if (graph.source(e) == graph.target(e))
     374    {
     375      std::cerr << "Removed loop edge " << (*edgemap_storage["label"])[e]
     376        << " (from " << (*nodemap_storage["label"])[graph.source(e)]
     377        << ", to " << (*nodemap_storage["label"])[graph.target(e)] << ")."
     378        << std::endl;
     379
     380      graph.erase(e);
     381    }
     382  }
     383
    369384  return 0;
    370385}
Note: See TracChangeset for help on using the changeset viewer.