add finals
This commit is contained in:
1 file changed
+6
-3
@@ -241,8 +241,11 @@ public class JobAssignmentFinder {
|
|||||||
|
|
||||||
public ArrayList<Integer> getGreedyAssignment()
|
public ArrayList<Integer> getGreedyAssignment()
|
||||||
{
|
{
|
||||||
ArrayList<Integer> assignment = new ArrayList<Integer>();
|
final ArrayList<Integer> assignment;
|
||||||
boolean[] assignedJobs = new boolean[this.problemSize];
|
final boolean[] assignedJobs;
|
||||||
|
|
||||||
|
assignment = new ArrayList<>();
|
||||||
|
assignedJobs = new boolean[this.problemSize];
|
||||||
|
|
||||||
for (int person = 0; person < this.problemSize; person++)
|
for (int person = 0; person < this.problemSize; person++)
|
||||||
{
|
{
|
||||||
@@ -267,7 +270,7 @@ public class JobAssignmentFinder {
|
|||||||
|
|
||||||
public int greedyAssignmentTotalValue()
|
public int greedyAssignmentTotalValue()
|
||||||
{
|
{
|
||||||
ArrayList<Integer> assignment = getGreedyAssignment();
|
final ArrayList<Integer> assignment = getGreedyAssignment();
|
||||||
return checkValueOfAssignment(assignment, this.benefitMatrix);
|
return checkValueOfAssignment(assignment, this.benefitMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user