Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aroTP1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COUETOUX Basile
aroTP1
Merge requests
!1
Dev1
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Dev1
o24014442/branch-and-bound:dev1
into
main
Overview
0
Commits
11
Pipelines
0
Changes
1
Open
OUATTARA Sie
requested to merge
o24014442/branch-and-bound:dev1
into
main
5 months ago
Overview
0
Commits
11
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
567d1f6a
Prev
Next
Show latest version
1 file
+
0
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
567d1f6a
sortByRatio() supprimé dans solve()
· 567d1f6a
Boubacar
authored
5 months ago
src/Backpack.java
+
0
−
2
View file @ 567d1f6a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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
Loading