mapstorage.cc
branchgui
changeset 50 eedecee61922
parent 31 66e85f44a66f
child 53 e73d7540bd24
equal deleted inserted replaced
6:0615980175fb 7:9f039be3b387
     4 {
     4 {
     5 };
     5 };
     6 
     6 
     7 int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap)
     7 int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap)
     8 {
     8 {
     9   nodemap_storage[name]=nodemap;
     9   if( nodemap_storage.find(name) == nodemap_storage.end() )
    10   return 0;
    10     {
       
    11       nodemap_storage[name]=nodemap;
       
    12       return 0;
       
    13     }
       
    14   return 1;
    11 }
    15 }
    12 
    16 
    13 int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap)
    17 int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap)
    14 {
    18 {
    15   edgemap_storage[name]=edgemap;
    19   if( edgemap_storage.find(name) == edgemap_storage.end() )
    16   return 0;
    20     {
       
    21       edgemap_storage[name]=edgemap;
       
    22       return 0;
       
    23     }
       
    24   return 1;
    17 }
    25 }
    18 
    26 
    19 double MapStorage::maxOfNodeMap(const std::string & name)
    27 double MapStorage::maxOfNodeMap(const std::string & name)
    20 {
    28 {
    21   double max=0;
    29   double max=0;