COIN-OR::LEMON - Graph Library

Changeset 115:3d9681ef6116 in lemon-0.x for src/work/alpar


Ignore:
Timestamp:
02/22/04 13:51:34 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@150
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/smart_graph.h

    r108 r115  
    283283      {
    284284        //FIXME: What if there are empty Id's?
     285        //FIXME: Can I use 'this' in a constructor?
    285286        G->dyn_node_maps.push_back(this);
    286287      }
     
    291292          for(i=G->dyn_node_maps.begin();
    292293              i!=G->dyn_node_maps.end() && *i!=this; ++i) ;
    293           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?)
     296          if(*i==this) {
     297            G->dyn_node_maps[i]=G->dyn_node_maps.back;
     298            G->dyn_node_maps.pop_back();
     299          }
    294300        }
    295301      }
     
    325331      {
    326332        //FIXME: What if there are empty Id's?
    327         //FIXME: Can I do that? :
     333        //FIXME: Can I use 'this' in a constructor?
    328334        G->dyn_edge_maps.push_back(this);
    329335      }
     
    334340          for(i=G->dyn_edge_maps.begin();
    335341              i!=G->dyn_edge_maps.end() && *i!=this; ++i) ;
    336           if(*i==this) G->dyn_edge_maps.erase(i); //FIXME: 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?)
     344          if(*i==this) {
     345            G->dyn_edge_maps[i]=G->dyn_edge_maps.back;
     346            G->dyn_edge_maps.pop_back();
     347          }
    337348        }
    338349      }
    339 
     350     
    340351      void add(const EdgeIt k)
    341352      {
Note: See TracChangeset for help on using the changeset viewer.