COIN-OR::LEMON - Graph Library

Changeset 1525:6d94de269ab1 in lemon-0.x for gui/mapstorage.cc


Ignore:
Timestamp:
06/29/05 21:44:30 (19 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2011
Message:

Uh, long comment arrives... Zoom update does not happen after editorial steps. Nodes initial color is light blue, if there is any item under them. Strange node-text relations disappeared. Initial values of new items are given now in a more common way. The wood-cutter way of handling default values of properties is now changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mapstorage.cc

    r1524 r1525  
    33MapStorage::MapStorage(Graph & graph):g(graph)
    44{
    5   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    6   {
    7     Graph::EdgeMap<double> emd(g,edge_property_defaults[i]);
    8     default_edgemaps.push_back(emd);
    9   }
    10 
    11   for(int i=0;i<NODE_PROPERTY_NUM;i++)
    12   {
    13     Graph::NodeMap<double> nmd(g,node_property_defaults[i]);
    14     default_nodemaps.push_back(nmd);
    15   }
    16 
    17   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    18   {
    19       for (EdgeIt j(g); j!=INVALID; ++j)
    20       {
    21         (default_edgemaps[i])[j]=edge_property_defaults[i];
    22       }
    23       addEdgeMap(edge_property_strings[i],&(default_edgemaps[i]));
    24   }
    25 
    26   for(int i=0;i<NODE_PROPERTY_NUM;i++)
    27   {
    28       for (NodeIt j(g); j!=INVALID; ++j)
    29       {
    30         (default_nodemaps[i])[j]=node_property_defaults[i];
    31       }
    32       addNodeMap(node_property_strings[i],&(default_nodemaps[i]));
    33   }
    34 
    355};
    366
     
    10373void MapStorage::initMapsForEdge(Graph::Edge e)
    10474{
    105   e=e;
    106 // beragad, aztan csovez
    107 //   std::map< std::string,Graph::EdgeMap<double> * >::iterator ems_it;
    108 //   for(ems_it=edgemap_storage.begin();ems_it!=edgemap_storage.end();ems_it++)
    109 //     {
    110 //       std::cout << "szevasz\n";
    111 //       (*((*ems_it).second))[e]=0;
    112 //     }
    113 //   std::cout << std::endl;
    114 
    115 // g_closure_invoke...
    116 //   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    117 //     {
    118 //       (default_edgemaps[i])[e]=property_defaults[i];
    119 //     }
     75  std::map< std::string,Graph::EdgeMap<double> * >::iterator ems_it;
     76  for(ems_it=edgemap_storage.begin();ems_it!=edgemap_storage.end();ems_it++)
     77    {
     78      (*((*ems_it).second))[e]=5;
     79    }
    12080}
Note: See TracChangeset for help on using the changeset viewer.