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; rrenkert@7829: protected TDoubleArrayList soundingWidth; rrenkert@7829: protected TDoubleArrayList morphWidth1; rrenkert@7829: protected TDoubleArrayList morphWidth2; 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(); rrenkert@7829: this.soundingWidth = new TDoubleArrayList(); rrenkert@7829: this.morphWidth1 = new TDoubleArrayList(); rrenkert@7829: this.morphWidth2 = 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, rrenkert@7829: TDoubleArrayList morphWidth1, rrenkert@7829: TDoubleArrayList morphWidth2, rrenkert@7829: TDoubleArrayList soundingWidth, 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; rrenkert@7829: this.soundingWidth = soundingWidth; rrenkert@7829: this.morphWidth1 = morphWidth1; rrenkert@7829: this.morphWidth2 = morphWidth2; 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: rrenkert@7829: public TDoubleArrayList getMorphWidth1() { rrenkert@7829: return this.morphWidth1; rrenkert@7829: } rrenkert@7829: rrenkert@7829: public TDoubleArrayList getMorphWidth2() { rrenkert@7829: return this.morphWidth2; rrenkert@7829: } rrenkert@7829: rrenkert@7829: public TDoubleArrayList getSoundingWidth() { rrenkert@7829: return this.soundingWidth; 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@7829: public void addMorphWidth1(double value) { rrenkert@7829: this.morphWidth1.add(value); rrenkert@7829: } rrenkert@7829: rrenkert@7829: public void addMorphWidth2(double value) { rrenkert@7829: this.morphWidth2.add(value); rrenkert@7829: } rrenkert@7829: rrenkert@7829: public void addSoundingWidth(double value) { rrenkert@7829: this.soundingWidth.add(value); rrenkert@4636: } rrenkert@4636: rrenkert@4636: public void addBedHeights(double value) { rrenkert@4636: this.bedHeights.add(value); rrenkert@4636: } rrenkert@4636: rrenkert@7829: public double[][] getMorphWidth1Data() { raimund@3898: return new double[][] { raimund@3898: kms.toNativeArray(), rrenkert@7829: morphWidth1.toNativeArray() rrenkert@7829: }; rrenkert@7829: } rrenkert@7829: rrenkert@7829: public double[][] getMorphWidth2Data() { rrenkert@7829: return new double[][] { rrenkert@7829: kms.toNativeArray(), rrenkert@7829: morphWidth2.toNativeArray() rrenkert@7829: }; rrenkert@7829: } rrenkert@7829: rrenkert@7829: public double[][] getSoundingWidthData() { rrenkert@7829: return new double[][] { rrenkert@7829: kms.toNativeArray(), rrenkert@7829: soundingWidth.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: } teichmann@7913: teichmann@7913: @Override teichmann@7913: public String getDiffDescription() { teichmann@7913: return nameFirst + " - " + nameSecond; teichmann@7913: } raimund@3887: } felix@6764: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :