src/work/jacint/dijkstra.cc
changeset 207 9910d5a5be7f
parent 170 9091b1ebca27
child 211 9222a9b8b323
equal deleted inserted replaced
3:6e808b2b6679 4:2e3b2d87a85a
    64 	  ++hiba_bin;
    64 	  ++hiba_bin;
    65 	}
    65 	}
    66       if ( e==dijkstra_test.pred(u) && 
    66       if ( e==dijkstra_test.pred(u) && 
    67 	   dijkstra_test.dist(u) - dijkstra_test.dist(v) != cap.get(e) )
    67 	   dijkstra_test.dist(u) - dijkstra_test.dist(v) != cap.get(e) )
    68 	{
    68 	{
    69 	  std::cout<<"Hibas fael a fibonaccis Dijkstraban!"<<std::endl;
    69 	  std::cout<<"Hibas fael a fibonaccis Dijkstraban: "<<
       
    70 	    dijkstra_test.dist(u) - dijkstra_test.dist(v)- cap.get(e)<<std::endl;
    70 	  ++hiba_fib;
    71 	  ++hiba_fib;
    71 	}
    72 	}
    72       if ( e==dijkstra_test2.pred(u) && 
    73       if ( e==dijkstra_test2.pred(u) && 
    73 	   dijkstra_test2.dist(u) - dijkstra_test2.dist(v) != cap.get(e) )
    74 	   dijkstra_test2.dist(u) - dijkstra_test2.dist(v) != cap.get(e) )
    74 	{
    75 	{
    75 	  std::cout<<"Hibas fael a binarisos Dijkstraban!"<<std::endl;
    76 	  std::cout<<"Hibas fael a binarisos Dijkstraban: "<<
       
    77 	    dijkstra_test2.dist(u) - dijkstra_test2.dist(v)- cap.get(e)<<std::endl;
    76 	  ++hiba_bin;
    78 	  ++hiba_bin;
    77 	}
    79 	}
    78     }
    80     }
    79   }
    81  
       
    82     if ( dijkstra_test.dist(u) != dijkstra_test2.dist(u) ) 
       
    83       std::cout << "Nem egyezik meg a tavolsag!"<<std::endl;
       
    84 
       
    85 
       
    86  }
    80 
    87 
    81   std::cout << "Hibas elek szama a fibonaccis Dijkstraban: " 
    88   std::cout << "Hibas elek szama a fibonaccis Dijkstraban: " 
    82 	    << hiba_fib << " a " << G.edgeNum() <<"-bol."<< std::endl;
    89 	    << hiba_fib << " a " << G.edgeNum() <<"-bol."<< std::endl;
    83 
    90 
    84   std::cout << "Hibas elek szama a binarisos Dijkstraban: " 
    91   std::cout << "Hibas elek szama a binarisos Dijkstraban: " 
    85 	    << hiba_bin << " a " << G.edgeNum() <<"-bol."<< std::endl;
    92 	    << hiba_bin << " a " << G.edgeNum() <<"-bol."<< std::endl;
    86 
    93 
       
    94 
       
    95 
       
    96 
    87   return 0;
    97   return 0;
    88 }
    98 }