dijkstrabox.cc
branchfastopen
changeset 204 8fec6a6472fe
parent 174 95872af46fc4
child 194 6b2b718420eb
equal deleted inserted replaced
3:71ccfadc083c 4:f7cd6b70d166
   142 	  int found=sb.run(num_set->get_value_as_int());
   142 	  int found=sb.run(num_set->get_value_as_int());
   143 	  if(found)
   143 	  if(found)
   144 	    {
   144 	    {
   145 	      for(int j=0;j<found;j++)
   145 	      for(int j=0;j<found;j++)
   146 		{
   146 		{
   147 		  Path<Graph> path(g);
   147 		  Path<Graph> path;
   148 		  sb.getPath(path, j);
   148 		  path=sb.path(j);
   149 		  for(int k=0;k<path.length();k++)
   149 		  for(int k=0;k<path.length();k++)
   150 		    {
   150 		    {
   151 		      Path<Graph>::EdgeIt ei;
   151 		      (*outputmap)[path.nth(k)]=j+1;
   152 		      ei=path.nthEdge(k);
       
   153 		      (*outputmap)[ei]=j+1;
       
   154 		    }
   152 		    }
   155 		}
   153 		}
   156 	      o << "Result: found " << found << " paths between ";
   154 	      o << "Result: found " << found << " paths between ";
   157 	      o << source.get_active_text() << " and " << target.get_active_text();
   155 	      o << source.get_active_text() << " and " << target.get_active_text();
   158 	    }
   156 	    }