Skip to content
Snippets Groups Projects
Commit f4105621 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Code cleaning

parent 8a2e8ea4
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@ public class Request {
public void runPreliminaryChecks() {
this.sortScores();
this.checkAndFixWeights();
this.checkAndFixMissingScores();
}
private void sortScores() {
// make sure that criteria are in the same order across all options
......@@ -31,23 +30,7 @@ public class Request {
}
}
}
private void checkAndFixMissingScores() {
// find the minimum value of score in each criterion
double[] minimumScores = new double[criteria_weights.length];
for (int i = 0; i < minimumScores.length; i++) {
for (int j = 0; j < options.length; j++) {
System.out.println(options[j].getScores()[i].getScore());
if (options[j].getScores()[i].getScore() < minimumScores[i]) minimumScores[i] = options[j].getScores()[i].getScore();
}
}
// replace null values with minimum values
/*for (int i = 0; i < minimumScores.length; i++) {
for (int j = 0; j < options.length; j++) {
if (options[j].getScores()[i].getScore() == null) minimumScores[i] = options[j].getScores()[i].getScore();
}
}*/
}
public UUID getUuid() {
public UUID getUuid() {
return uuid;
}
public Weight[] getCriteria_weights() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment