COIN-OR::LEMON - Graph Library

Changeset 2498:290e43cddc1a in lemon-0.x for lemon/bits


Ignore:
Timestamp:
10/19/07 17:21:07 (12 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3337
Message:

Bug fix in undirected graphs (adding loops)
Bug fix in undirected edgesets (alteration notifying)

Redesigned undirected edgesets (like the smart or ugraph)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/edge_set_extender.h

    r2391 r2498  
    591591      UEdge uedge = Parent::addEdge(from, to);
    592592      notifier(UEdge()).add(uedge);
    593       notifier(Edge()).add(Parent::direct(uedge, true));
    594       notifier(Edge()).add(Parent::direct(uedge, false));
     593      std::vector<Edge> edges;
     594      edges.push_back(Parent::direct(uedge, true));
     595      edges.push_back(Parent::direct(uedge, false));
     596      notifier(Edge()).add(edges);
    595597      return uedge;
    596598    }
     
    603605
    604606    void erase(const UEdge& uedge) {
    605       notifier(Edge()).erase(Parent::direct(uedge, true));
    606       notifier(Edge()).erase(Parent::direct(uedge, false));
     607      std::vector<Edge> edges;
     608      edges.push_back(Parent::direct(uedge, true));
     609      edges.push_back(Parent::direct(uedge, false));
     610      notifier(Edge()).erase(edges);
    607611      notifier(UEdge()).erase(uedge);
    608612      Parent::erase(uedge);
Note: See TracChangeset for help on using the changeset viewer.