equal
deleted
inserted
replaced
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; |