Parcourir la source

SLList update

Rémi Synave il y a 6 mois
Parent
commit
bdc4abe914
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 4 4
      SLList/Main.cpp
  2. 1 1
      SLList/SLList.cpp

+ 4 - 4
SLList/Main.cpp

@@ -7,7 +7,7 @@
 
 int main(int argc, char** argv)
 {
-  /*if(argc!=4)
+  if(argc!=4)
     {
       std::cout << "usage : " << argv[0] << " json1 json2 image" << std::endl;
       return EXIT_FAILURE;
@@ -20,9 +20,9 @@ int main(int argc, char** argv)
   SLList sll2(fichier2);
   QImage img(argv[3]);
   std::pair<double, int> resultat = SLList::distance(&sll1, &sll2, &img);
-  std::cout << "( " << resultat.first << " , " << resultat.second << " )" << std::endl;*/
+  std::cout << "( " << resultat.first << " , " << resultat.second << " )" << std::endl;
 
-  std::string path="../officialTestDirectory/img";
+  /*std::string path="../officialTestDirectory/img";
   std::vector<std::string> numImg;
   std::vector<std::string> nomExpert;
   
@@ -56,5 +56,5 @@ int main(int argc, char** argv)
       std::cout << "Score C - remiS  : " << std::get<0>(dAC)+std::get<0>(dBC)+std::get<0>(dCD) << std::endl;
       std::cout << "Score D - samuel : " << std::get<0>(dAD)+std::get<0>(dBD)+std::get<0>(dCD) << std::endl;
       std::cout << std::endl << std::endl << std::endl;
-    }
+      }*/
 }

+ 1 - 1
SLList/SLList.cpp

@@ -89,7 +89,7 @@ std::pair<double, int> SLList::distance(SLList* sllist1, SLList* sllist2, QImage
   std::pair<double, int> d1 = sllist1->distance_avg(sllist2, img);
   std::pair<double, int> d2 = sllist2->distance_avg(sllist1, img);
 
-  return std::make_pair((std::get<0>(d1)+std::get<0>(d2))/2, abs(std::get<1>(d1)));
+  return std::make_pair((std::get<0>(d1)+std::get<0>(d2))/2, std::get<1>(d1));
 }
 
 /*