1.1 --- a/mapstorage.cc Wed Jul 27 11:19:35 2005 +0000
1.2 +++ b/mapstorage.cc Wed Jul 27 11:35:13 2005 +0000
1.3 @@ -6,14 +6,22 @@
1.4
1.5 int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap)
1.6 {
1.7 - nodemap_storage[name]=nodemap;
1.8 - return 0;
1.9 + if( nodemap_storage.find(name) == nodemap_storage.end() )
1.10 + {
1.11 + nodemap_storage[name]=nodemap;
1.12 + return 0;
1.13 + }
1.14 + return 1;
1.15 }
1.16
1.17 int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap)
1.18 {
1.19 - edgemap_storage[name]=edgemap;
1.20 - return 0;
1.21 + if( edgemap_storage.find(name) == edgemap_storage.end() )
1.22 + {
1.23 + edgemap_storage[name]=edgemap;
1.24 + return 0;
1.25 + }
1.26 + return 1;
1.27 }
1.28
1.29 double MapStorage::maxOfNodeMap(const std::string & name)