gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Add artificial addNode() function to the arc/edge set classes
0 1 0
default
1 file changed with 24 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -84,6 +84,12 @@
84 84

	
85 85
    ListArcSetBase() : first_arc(-1), first_free_arc(-1) {}
86 86

	
87
    Node addNode() {
88
      LEMON_ASSERT(false,
89
        "This graph structure does not support node insertion");
90
      return INVALID; // avoid warning
91
    }
92

	
87 93
    Arc addArc(const Node& u, const Node& v) {
88 94
      int n;
89 95
      if (first_free_arc == -1) {
... ...
@@ -416,6 +422,12 @@
416 422

	
417 423
    ListEdgeSetBase() : first_arc(-1), first_free_arc(-1) {}
418 424

	
425
    Node addNode() {
426
      LEMON_ASSERT(false,
427
        "This graph structure does not support node insertion");
428
      return INVALID; // avoid warning
429
    }
430

	
419 431
    Edge addEdge(const Node& u, const Node& v) {
420 432
      int n;
421 433

	
... ...
@@ -816,6 +828,12 @@
816 828

	
817 829
    SmartArcSetBase() {}
818 830

	
831
    Node addNode() {
832
      LEMON_ASSERT(false,
833
        "This graph structure does not support node insertion");
834
      return INVALID; // avoid warning
835
    }
836

	
819 837
    Arc addArc(const Node& u, const Node& v) {
820 838
      int n = arcs.size();
821 839
      arcs.push_back(ArcT());
... ...
@@ -1112,6 +1130,12 @@
1112 1130

	
1113 1131
    SmartEdgeSetBase() {}
1114 1132

	
1133
    Node addNode() {
1134
      LEMON_ASSERT(false,
1135
        "This graph structure does not support node insertion");
1136
      return INVALID; // avoid warning
1137
    }
1138

	
1115 1139
    Edge addEdge(const Node& u, const Node& v) {
1116 1140
      int n = arcs.size();
1117 1141
      arcs.push_back(ArcT());
0 comments (0 inline)