teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model.minfo; raimund@3887: raimund@3887: import gnu.trove.TDoubleArrayList; raimund@3887: raimund@3887: felix@6764: /** Result of a bed diff year calculation. */ raimund@3887: public class BedDiffYearResult raimund@3887: extends BedDifferencesResult raimund@3887: { raimund@3887: protected TDoubleArrayList bedHeights; raimund@3887: protected TDoubleArrayList dataGap; raimund@3898: protected TDoubleArrayList morphWidth; raimund@3898: protected int start; raimund@3898: protected int end; felix@6089: protected String nameFirst; felix@6089: protected String nameSecond; sascha@3902: raimund@3887: public BedDiffYearResult () { raimund@3887: super(); raimund@3887: this.bedHeights = new TDoubleArrayList(); raimund@3887: this.dataGap = new TDoubleArrayList(); raimund@3898: this.morphWidth = new TDoubleArrayList(); raimund@3898: this.start = -1; raimund@3898: this.end = -1; raimund@3887: } raimund@3887: felix@7652: /** felix@7652: * @param kms the stations the following parameters are connected to. felix@7652: * @param differences the height differences felix@7652: * @param heights1 the heights felix@7652: * @param heights2 the other heights felix@7652: * @param bedHeights the differences normalized per year in m. felix@7652: */ raimund@3887: public BedDiffYearResult( raimund@3887: TDoubleArrayList kms, raimund@3887: TDoubleArrayList differences, raimund@3898: TDoubleArrayList heights1, raimund@3898: TDoubleArrayList heights2, raimund@3887: TDoubleArrayList morphWidth, raimund@3887: TDoubleArrayList bedHeights, raimund@3898: TDoubleArrayList dataGap, raimund@3898: int start, felix@6089: int end, felix@6089: String nameFirst, felix@6089: String nameSecond raimund@3887: ) { raimund@3898: super(kms, differences, heights1, heights2); raimund@3887: this.bedHeights = bedHeights; raimund@3887: this.dataGap = dataGap; raimund@3898: this.morphWidth = morphWidth; raimund@3898: this.start = start; raimund@3898: this.end = end; felix@6089: this.nameFirst = nameFirst; felix@6089: this.nameSecond = nameSecond; raimund@3887: } raimund@3887: raimund@3887: public TDoubleArrayList getBedHeights() { raimund@3887: return this.bedHeights; raimund@3887: } raimund@3887: raimund@3887: public TDoubleArrayList getDataGap() { raimund@3887: return this.dataGap; raimund@3887: } raimund@3898: raimund@3898: public TDoubleArrayList getMorphWidth() { raimund@3898: return this.morphWidth; raimund@3898: } raimund@3898: raimund@3898: public int getStart() { raimund@3898: return this.start; raimund@3898: } raimund@3898: rrenkert@4636: public void setStart(int value) { rrenkert@4636: this.start = value; rrenkert@4636: } rrenkert@4636: rrenkert@4636: public void setEnd(int value) { rrenkert@4636: this.end = value; rrenkert@4636: } rrenkert@4636: raimund@3898: public int getEnd() { raimund@3898: return this.end; raimund@3898: } raimund@3898: felix@6089: /** Get name of the first BedHeight (minuend). */ felix@6089: public String getNameFirst() { felix@6089: return this.nameFirst; felix@6089: } felix@6089: felix@6089: /** Get name of the second BedHeight (subtrahend). */ felix@6089: public String getNameSecond() { rrenkert@6211: return this.nameSecond; felix@6089: } felix@6089: rrenkert@4636: public void addMorphWidth(double value) { rrenkert@4636: this.morphWidth.add(value); rrenkert@4636: } rrenkert@4636: rrenkert@4636: public void addBedHeights(double value) { rrenkert@4636: this.bedHeights.add(value); rrenkert@4636: } rrenkert@4636: raimund@3898: public double[][] getMorphWidthData() { raimund@3898: return new double[][] { raimund@3898: kms.toNativeArray(), raimund@3898: morphWidth.toNativeArray() raimund@3898: }; raimund@3898: } raimund@3898: raimund@3898: public double[][] getHeightPerYearData() { raimund@3898: return new double[][] { raimund@3898: kms.toNativeArray(), raimund@3898: bedHeights.toNativeArray() raimund@3898: }; raimund@3898: } raimund@3887: } felix@6764: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :