mapstorage.cc
branchgui
changeset 59 c38925cc6a4d
parent 53 e73d7540bd24
child 60 3e58623c588d
equal deleted inserted replaced
8:0ac567e9a3d8 9:d115cb03858c
    72 }
    72 }
    73 
    73 
    74 double MapStorage::minOfNodeMap(const std::string & name)
    74 double MapStorage::minOfNodeMap(const std::string & name)
    75 {
    75 {
    76   NodeIt j(graph);
    76   NodeIt j(graph);
    77   double min=(*nodemap_storage[name])[j];
    77   double min;
       
    78   if(j!=INVALID)
       
    79     {
       
    80       min=(*nodemap_storage[name])[j];
       
    81     }
       
    82   else
       
    83     {
       
    84       min=0;
       
    85     }
    78   for (; j!=INVALID; ++j)
    86   for (; j!=INVALID; ++j)
    79   {
    87   {
    80     if( (*nodemap_storage[name])[j]<min )
    88     if( (*nodemap_storage[name])[j]<min )
    81     {
    89     {
    82       min=(*nodemap_storage[name])[j];
    90       min=(*nodemap_storage[name])[j];
    86 }
    94 }
    87 
    95 
    88 double MapStorage::minOfEdgeMap(const std::string & name)
    96 double MapStorage::minOfEdgeMap(const std::string & name)
    89 {
    97 {
    90   EdgeIt j(graph);
    98   EdgeIt j(graph);
    91   double min=(*edgemap_storage[name])[j];
    99   double min;
       
   100   if(j!=INVALID)
       
   101     {
       
   102       min=(*edgemap_storage[name])[j];
       
   103     }
       
   104   else
       
   105     {
       
   106       min=0;
       
   107     }
    92   for (EdgeIt j(graph); j!=INVALID; ++j)
   108   for (EdgeIt j(graph); j!=INVALID; ++j)
    93   {
   109   {
    94     if( (*edgemap_storage[name])[j]<min )
   110     if( (*edgemap_storage[name])[j]<min )
    95     {
   111     {
    96       min=(*edgemap_storage[name])[j];
   112       min=(*edgemap_storage[name])[j];