COIN-OR::LEMON - Graph Library

Changeset 670:926c47568a56 in lemon-main


Ignore:
Timestamp:
05/13/09 10:42:26 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Add artificial addNode() function to the arc/edge set classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/edge_set.h

    r660 r670  
    8585    ListArcSetBase() : first_arc(-1), first_free_arc(-1) {}
    8686
     87    Node addNode() {
     88      LEMON_ASSERT(false,
     89        "This graph structure does not support node insertion");
     90      return INVALID; // avoid warning
     91    }
     92
    8793    Arc addArc(const Node& u, const Node& v) {
    8894      int n;
     
    416422
    417423    ListEdgeSetBase() : first_arc(-1), first_free_arc(-1) {}
     424
     425    Node addNode() {
     426      LEMON_ASSERT(false,
     427        "This graph structure does not support node insertion");
     428      return INVALID; // avoid warning
     429    }
    418430
    419431    Edge addEdge(const Node& u, const Node& v) {
     
    817829    SmartArcSetBase() {}
    818830
     831    Node addNode() {
     832      LEMON_ASSERT(false,
     833        "This graph structure does not support node insertion");
     834      return INVALID; // avoid warning
     835    }
     836
    819837    Arc addArc(const Node& u, const Node& v) {
    820838      int n = arcs.size();
     
    11131131    SmartEdgeSetBase() {}
    11141132
     1133    Node addNode() {
     1134      LEMON_ASSERT(false,
     1135        "This graph structure does not support node insertion");
     1136      return INVALID; // avoid warning
     1137    }
     1138
    11151139    Edge addEdge(const Node& u, const Node& v) {
    11161140      int n = arcs.size();
Note: See TracChangeset for help on using the changeset viewer.