src/work/alpar/smart_graph.h
changeset 117 67253d52b284
parent 115 3d9681ef6116
child 129 1630a5b631c8
equal deleted inserted replaced
3:6927693267aa 4:5656900786e7
   292 	  for(i=G->dyn_node_maps.begin();
   292 	  for(i=G->dyn_node_maps.begin();
   293 	      i!=G->dyn_node_maps.end() && *i!=this; ++i) ;
   293 	      i!=G->dyn_node_maps.end() && *i!=this; ++i) ;
   294 	  //if(*i==this) G->dyn_node_maps.erase(i); //FIXME: Way too slow...
   294 	  //if(*i==this) G->dyn_node_maps.erase(i); //FIXME: Way too slow...
   295 	  //A better way to do that: (Is this really important?)
   295 	  //A better way to do that: (Is this really important?)
   296 	  if(*i==this) {
   296 	  if(*i==this) {
   297 	    G->dyn_node_maps[i]=G->dyn_node_maps.back;
   297 	    *i=G->dyn_node_maps.back();
   298 	    G->dyn_node_maps.pop_back();
   298 	    G->dyn_node_maps.pop_back();
   299 	  }
   299 	  }
   300 	}
   300 	}
   301       }
   301       }
   302 
   302 
   340 	  for(i=G->dyn_edge_maps.begin();
   340 	  for(i=G->dyn_edge_maps.begin();
   341 	      i!=G->dyn_edge_maps.end() && *i!=this; ++i) ;
   341 	      i!=G->dyn_edge_maps.end() && *i!=this; ++i) ;
   342 	  //if(*i==this) G->dyn_edge_maps.erase(i); //Way too slow...
   342 	  //if(*i==this) G->dyn_edge_maps.erase(i); //Way too slow...
   343 	  //A better way to do that: (Is this really important?)
   343 	  //A better way to do that: (Is this really important?)
   344 	  if(*i==this) {
   344 	  if(*i==this) {
   345 	    G->dyn_edge_maps[i]=G->dyn_edge_maps.back;
   345 	    *i=G->dyn_edge_maps.back();
   346 	    G->dyn_edge_maps.pop_back();
   346 	    G->dyn_edge_maps.pop_back();
   347 	  }
   347 	  }
   348 	}
   348 	}
   349       }
   349       }
   350       
   350