Mercurial > dive4elements > river
changeset 9356:202fd59b4f21
Fixed: missing commit
author | gernotbelger |
---|---|
date | Tue, 31 Jul 2018 18:17:10 +0200 |
parents | 7c74ee8d6767 |
children | 5ce50640688c |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixCalculation.java |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixCalculation.java Tue Jul 31 18:12:36 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixCalculation.java Tue Jul 31 18:17:10 2018 +0200 @@ -44,12 +44,12 @@ protected Parameters parameters; protected KMIndex<QWD[]> referenced; - protected KMIndex<QWI[]> outliers; + protected KMIndex<QWD[]> outliers; public FitResult() { } - public FitResult(final Parameters parameters, final KMIndex<QWD[]> referenced, final KMIndex<QWI[]> outliers) { + public FitResult(final Parameters parameters, final KMIndex<QWD[]> referenced, final KMIndex<QWD[]> outliers) { this.parameters = parameters; this.referenced = referenced; this.outliers = outliers; @@ -63,7 +63,7 @@ return this.referenced; } - public KMIndex<QWI[]> getOutliers() { + public KMIndex<QWD[]> getOutliers() { return this.outliers; } } // class FitResult @@ -234,8 +234,6 @@ } protected List<Column> getEventColumns(final FixingsOverview overview, final ColumnCache cc) { - final FixingsColumnFactory fcf = FixingsColumnFactory.getInstance(); - final Filter filter = createFilter(); final List<Fixing.Column> metas = overview.filter(null, filter); @@ -272,17 +270,17 @@ final Fitting.QWDFactory qwdFactory = new Fitting.QWDFactory() { @Override - public QWD create(final double q, final double w) { + public QWD create(final double q, final double w, boolean isOutlier) { // Check all the event columns for close match // and take the description and the date from meta. for (int i = 0; i < qs.length; ++i) { if (Math.abs(qs[i] - q) < EPSILON && Math.abs(ws[i] - w) < EPSILON) { final Column column = eventColumns.get(i); - return new QWD(qs[i], ws[i], column.getDescription(), column.getDate(), interpolated[i], 0d, column.getId()); // Use database id here + return new QWD(qs[i], ws[i], column.getDescription(), column.getDate(), interpolated[i], 0d, column.getId(), isOutlier); // Use database id here } } log.warn("cannot find column for (" + q + ", " + w + ")"); - return new QWD(q, w); + return new QWD(q, w, isOutlier); } }; @@ -300,7 +298,7 @@ log.debug("number of kms: " + kms.length); } - final KMIndex<QWI[]> outliers = new KMIndex<>(); + final KMIndex<QWD[]> outliers = new KMIndex<>(); final KMIndex<QWD[]> referenced = new KMIndex<>(kms.length); final int kmIndex = results.columnIndex("km");