Skip to content
Snippets Groups Projects
Commit 091d27c5 authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Identity return replaced with method call

parent c35c8a18
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ public class DistanceAction extends ControlPanelAction { ...@@ -78,7 +78,7 @@ public class DistanceAction extends ControlPanelAction {
fpWeights.getValue() // ... compute average FP weight over all its facets fpWeights.getValue() // ... compute average FP weight over all its facets
.values() .values()
.stream() .stream()
.mapToDouble(weight -> weight) .mapToDouble(Double::doubleValue)
.average() .average()
.orElse(Double.NaN))) .orElse(Double.NaN)))
.filter(fpWeight -> !Double.isNaN(fpWeight.getValue())) // Filter out feature points with Double.NaN weight .filter(fpWeight -> !Double.isNaN(fpWeight.getValue())) // Filter out feature points with Double.NaN weight
...@@ -298,7 +298,7 @@ public class DistanceAction extends ControlPanelAction { ...@@ -298,7 +298,7 @@ public class DistanceAction extends ControlPanelAction {
weights -> weights.getValue() // ... compute average FP weight over all its facets weights -> weights.getValue() // ... compute average FP weight over all its facets
.values() .values()
.stream() .stream()
.mapToDouble(weight -> weight) .mapToDouble(Double::doubleValue)
.average() .average()
.orElse(Double.NaN)))); .orElse(Double.NaN))));
} }
...@@ -313,13 +313,13 @@ public class DistanceAction extends ControlPanelAction { ...@@ -313,13 +313,13 @@ public class DistanceAction extends ControlPanelAction {
.values() .values()
.stream() .stream()
.flatMap(List::stream) .flatMap(List::stream)
.mapToDouble(distance -> distance) .mapToDouble(Double::doubleValue)
.summaryStatistics(), .summaryStatistics(),
weightedHausdorffDistance weightedHausdorffDistance
.values() .values()
.stream() .stream()
.flatMap(List::stream) .flatMap(List::stream)
.mapToDouble(distance -> distance) .mapToDouble(Double::doubleValue)
.summaryStatistics() .summaryStatistics()
); );
} }
......
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