Skip to content
Snippets Groups Projects
Commit 567d1f6a authored by Boubacar's avatar Boubacar
Browse files

sortByRatio() supprimé dans solve()

parent d28d7378
Branches
No related tags found
1 merge request!4Dev1
...@@ -20,7 +20,6 @@ public class Backpack { ...@@ -20,7 +20,6 @@ public class Backpack {
public void solve() { public void solve() {
bestSolution = new boolean[loots.size()]; bestSolution = new boolean[loots.size()];
currentSolution = new boolean[loots.size()]; currentSolution = new boolean[loots.size()];
sortByRatio();
solutionFractionnelle(); solutionFractionnelle();
explore_from(0); explore_from(0);
} }
...@@ -38,7 +37,6 @@ public class Backpack { ...@@ -38,7 +37,6 @@ public class Backpack {
public void solutionFractionnelle(){ public void solutionFractionnelle(){
this.sortByRatio(); this.sortByRatio();
for(Loot loot : loots){ for(Loot loot : loots){
if(sfWeight + loot.getWeight() <= this.capacity){ if(sfWeight + loot.getWeight() <= this.capacity){
// Si l'objet entier peut entrer dans le sac // Si l'objet entier peut entrer dans le sac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment