changeset 8563:59b4f6cf1cf4

Move static operation out of loop.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 16 Feb 2015 17:09:14 +0100
parents c62837ba37f3
children d1640df656ee
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Mon Feb 16 15:58:52 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Mon Feb 16 17:09:14 2015 +0100
@@ -191,11 +191,11 @@
         TDoubleArrayList location = new TDoubleArrayList();
         TDoubleArrayList avDiameterCap = new TDoubleArrayList();
         TDoubleArrayList avDiameterSub = new TDoubleArrayList();
+        QualityMeasurements capFiltered = filterCapMeasurements(qm);
+        QualityMeasurements subFiltered = filterSubMeasurements(qm);
+
         for (double km : kms) {
             //Filter cap and sub measurements.
-            QualityMeasurements capFiltered = filterCapMeasurements(qm);
-            QualityMeasurements subFiltered = filterSubMeasurements(qm);
-
             List<QualityMeasurement> cm = capFiltered.getMeasurements(km);
             List<QualityMeasurement> sm = subFiltered.getMeasurements(km);
 

http://dive4elements.wald.intevation.org