lemon/list_graph.h
changeset 1714 66c89fe52d4e
parent 1692 a34203867181
child 1718 6a958ab38386
equal deleted inserted replaced
6:a3e8d5f305ab 7:1243325ab6b0
   280       if(edges[e.id].next_in != -1)
   280       if(edges[e.id].next_in != -1)
   281 	edges[edges[e.id].next_in].prev_in = edges[e.id].prev_in;
   281 	edges[edges[e.id].next_in].prev_in = edges[e.id].prev_in;
   282       if(edges[e.id].prev_in != -1)
   282       if(edges[e.id].prev_in != -1)
   283 	edges[edges[e.id].prev_in].next_in = edges[e.id].next_in;
   283 	edges[edges[e.id].prev_in].next_in = edges[e.id].next_in;
   284       else nodes[edges[e.id].target].first_in = edges[e.id].next_in;
   284       else nodes[edges[e.id].target].first_in = edges[e.id].next_in;
       
   285       if (nodes[n.id].first_in != -1) {
       
   286 	edges[nodes[n.id].first_in].prev_in = e.id;
       
   287       }
   285       edges[e.id].target = n.id;
   288       edges[e.id].target = n.id;
   286       edges[e.id].prev_in = -1;
   289       edges[e.id].prev_in = -1;
   287       edges[e.id].next_in = nodes[n.id].first_in;
   290       edges[e.id].next_in = nodes[n.id].first_in;
   288       nodes[n.id].first_in = e.id;
   291       nodes[n.id].first_in = e.id;
   289     }
   292     }
   292       if(edges[e.id].next_out != -1)
   295       if(edges[e.id].next_out != -1)
   293 	edges[edges[e.id].next_out].prev_out = edges[e.id].prev_out;
   296 	edges[edges[e.id].next_out].prev_out = edges[e.id].prev_out;
   294       if(edges[e.id].prev_out != -1)
   297       if(edges[e.id].prev_out != -1)
   295 	edges[edges[e.id].prev_out].next_out = edges[e.id].next_out;
   298 	edges[edges[e.id].prev_out].next_out = edges[e.id].next_out;
   296       else nodes[edges[e.id].source].first_out = edges[e.id].next_out;
   299       else nodes[edges[e.id].source].first_out = edges[e.id].next_out;
       
   300       if (nodes[n.id].first_out != -1) {
       
   301 	edges[nodes[n.id].first_out].prev_out = e.id;
       
   302       }
   297       edges[e.id].source = n.id;
   303       edges[e.id].source = n.id;
   298       edges[e.id].prev_out = -1;
   304       edges[e.id].prev_out = -1;
   299       edges[e.id].next_out = nodes[n.id].first_out;
   305       edges[e.id].next_out = nodes[n.id].first_out;
   300       nodes[n.id].first_out = e.id;
   306       nodes[n.id].first_out = e.id;
   301     }
   307     }