Skip to content
Snippets Groups Projects
Commit d84784c7 authored by a.croix's avatar a.croix
Browse files

Fix style issues

parent 87255c80
No related branches found
No related tags found
No related merge requests found
Pipeline #1039 failed
...@@ -41,7 +41,9 @@ public class SolutionDistance implements Comparable<SolutionDistance> { ...@@ -41,7 +41,9 @@ public class SolutionDistance implements Comparable<SolutionDistance> {
* @param data * @param data
* @param expected * @param expected
*/ */
final void computeScoreTo(final List<double[]> data, final double[] expected) { final void computeScoreTo(final List<double[]> data,
final double[] expected
) {
this.distance = 0; this.distance = 0;
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
...@@ -85,8 +87,13 @@ public class SolutionDistance implements Comparable<SolutionDistance> { ...@@ -85,8 +87,13 @@ public class SolutionDistance implements Comparable<SolutionDistance> {
*/ */
@Override @Override
public int compareTo(final SolutionDistance solution) { public int compareTo(final SolutionDistance solution) {
return this.getDistance() > solution.getDistance() ? -1 if (this.getDistance() > solution.getDistance()) {
: this.getDistance() < solution.getDistance() ? 1 : 0; return -1;
} else if (this.getDistance() < solution.getDistance()) {
return 1;
} else {
return 0;
}
} }
/** /**
......
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