COIN-OR::LEMON - Graph Library

Changeset 194:6b2b718420eb in glemon-0.x for new_map_win.cc


Ignore:
Timestamp:
02/28/07 19:20:28 (17 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3205
Message:

Header reorganising

File:
1 edited

Legend:

Unmodified
Added
Removed
  • new_map_win.cc

    r174 r194  
    1818
    1919#include <new_map_win.h>
     20#include <nbtab.h>
     21#include <mapstorage.h>
    2022
    2123bool NewMapWin::closeIfEscapeIsPressed(GdkEventKey* e)
     
    120122            {
    121123              //create the new map
    122               Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph, def_val);
     124              Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage->graph, def_val);
    123125             
    124126              if(!only_nums)
     
    126128                  std::stack<double> polishstack;
    127129                 
    128                   for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
     130                  for(EdgeIt k(mytab.mapstorage->graph); k!=INVALID; ++k)
    129131                    {
    130132                      for(int i=0;i<(int)polishform.size();i++)
     
    145147                            default:
    146148                              //substitute variable
    147                               std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage;
     149                              std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage->edgemap_storage;
    148150                              bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
    149151                              if(itisvar)
    150152                                {
    151                                   polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
     153                                  polishstack.push( (*(mytab.mapstorage->edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    152154                                }
    153155                              else
     
    188190              //if addition was not successful addEdgeMap returns one.
    189191              //cause can be that there is already a map named like the new one
    190               if(mytab.mapstorage.addEdgeMap(mapname, emptr, def_val))
     192              if(mytab.mapstorage->addEdgeMap(mapname, emptr, def_val))
    191193                {
    192194                  abortion=1;
     
    203205            {
    204206              //create the new map
    205               Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph, def_val);
     207              Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage->graph, def_val);
    206208
    207209              if(!only_nums)
     
    209211                  std::stack<double> polishstack;
    210212 
    211                   for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
     213                  for(NodeIt k(mytab.mapstorage->graph); k!=INVALID; ++k)
    212214                    {
    213215                      for(int i=0;i<(int)polishform.size();i++)
     
    227229                              break;
    228230                            default:
    229                               std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage;
     231                              std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage->nodemap_storage;
    230232                              bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
    231233                              if(itisvar)
    232234                                {
    233                                   polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
     235                                  polishstack.push( (*(mytab.mapstorage->nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    234236                                }
    235237                              else
     
    269271              //if addition was not successful addNodeMap returns one.
    270272              //cause can be that there is already a map named like the new one
    271               if(mytab.mapstorage.addNodeMap(mapname,emptr, def_val))
     273              if(mytab.mapstorage->addNodeMap(mapname,emptr, def_val))
    272274                {
    273275                  abortion=1;
     
    480482  if(itisedge)
    481483    {
    482       cancel=(mytab.mapstorage.edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end());
     484      cancel=(mytab.mapstorage->edgemap_storage.find(variable)==mytab.mapstorage->edgemap_storage.end());
    483485    }
    484486  else
    485487    {
    486       cancel=(mytab.mapstorage.nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end());
     488      cancel=(mytab.mapstorage->nodemap_storage.find(variable)==mytab.mapstorage->nodemap_storage.end());
    487489    }
    488490  //maybe it is number
Note: See TracChangeset for help on using the changeset viewer.