diff -r 137cb007b199 -r c69fedfbb9b3 mapstorage.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mapstorage.cc Wed May 11 16:55:18 2005 +0000 @@ -0,0 +1,89 @@ +#include + +MapStorage::MapStorage(Graph & graph):g(graph) +{ + for(int i=0;i emd(g); + default_edgemaps.push_back(emd); + Graph::NodeMap nmd(g); + default_nodemaps.push_back(nmd); + } + + //std::string defaultstr="Default "; + for(int i=0;i *nodemap) +{ + nodemap_storage[name]=nodemap; + return 0; +} +int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap *edgemap) +{ + edgemap_storage[name]=edgemap; + return 0; +} + +double MapStorage::maxOfNodeMap(const std::string & name) +{ + double max=0; + for (NodeIt j(g); j!=INVALID; ++j) + { + if( (*nodemap_storage[name])[j]>max ) + { + max=(*nodemap_storage[name])[j]; + } + } + return max; +} + +double MapStorage::maxOfEdgeMap(const std::string & name) +{ + double max=0; + for (EdgeIt j(g); j!=INVALID; ++j) + { + if( (*edgemap_storage[name])[j]>max ) + { + max=(*edgemap_storage[name])[j]; + } + } + return max; +} + +double MapStorage::minOfNodeMap(const std::string & name) +{ + NodeIt j(g); + double min=(*nodemap_storage[name])[j]; + for (; j!=INVALID; ++j) + { + if( (*nodemap_storage[name])[j]