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: { tom@8169: protected TDoubleArrayList diffsPerYear; raimund@3887: protected TDoubleArrayList dataGap; rrenkert@7829: protected TDoubleArrayList soundingWidth; teichmann@8420: //protected TDoubleArrayList morphWidth1; teichmann@8420: //protected TDoubleArrayList morphWidth2; tom@8169: protected Integer start; tom@8169: protected Integer end; felix@6089: protected String nameFirst; felix@6089: protected String nameSecond; tom@8273: protected int idFirst; tom@8273: protected int idSecond; sascha@3902: raimund@3887: public BedDiffYearResult () { raimund@3887: super(); tom@8169: this.diffsPerYear = new TDoubleArrayList(); raimund@3887: this.dataGap = new TDoubleArrayList(); rrenkert@7829: this.soundingWidth = new TDoubleArrayList(); teichmann@8420: //this.morphWidth1 = new TDoubleArrayList(); teichmann@8420: //this.morphWidth2 = new TDoubleArrayList(); 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 tom@8169: * @param diffsPerYear the differences normalized per year in cm. felix@7652: */ raimund@3887: public BedDiffYearResult( raimund@3887: TDoubleArrayList kms, raimund@3887: TDoubleArrayList differences, raimund@3898: TDoubleArrayList heights1, raimund@3898: TDoubleArrayList heights2, teichmann@8420: //TDoubleArrayList morphWidth1, teichmann@8420: //TDoubleArrayList morphWidth2, rrenkert@7829: TDoubleArrayList soundingWidth, tom@8169: TDoubleArrayList diffsPerYear, raimund@3898: TDoubleArrayList dataGap, tom@8169: Integer start, tom@8169: Integer end, felix@6089: String nameFirst, tom@8273: String nameSecond, tom@8273: int idFirst, tom@8273: int idSecond raimund@3887: ) { raimund@3898: super(kms, differences, heights1, heights2); tom@8169: this.diffsPerYear = diffsPerYear; raimund@3887: this.dataGap = dataGap; rrenkert@7829: this.soundingWidth = soundingWidth; teichmann@8420: //this.morphWidth1 = morphWidth1; teichmann@8420: //this.morphWidth2 = morphWidth2; raimund@3898: this.start = start; raimund@3898: this.end = end; felix@6089: this.nameFirst = nameFirst; felix@6089: this.nameSecond = nameSecond; tom@8273: this.idFirst = idFirst; tom@8273: this.idSecond = idSecond; raimund@3887: } raimund@3887: raimund@3887: public TDoubleArrayList getBedHeights() { tom@8169: return this.diffsPerYear; raimund@3887: } raimund@3887: raimund@3887: public TDoubleArrayList getDataGap() { raimund@3887: return this.dataGap; raimund@3887: } raimund@3898: teichmann@8420: /* 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: } teichmann@8420: */ rrenkert@7829: rrenkert@7829: public TDoubleArrayList getSoundingWidth() { rrenkert@7829: return this.soundingWidth; raimund@3898: } raimund@3898: tom@8169: public Integer 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: tom@8169: public Integer 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: tom@8273: /** Get id of the first BedHeight (minuend). */ tom@8273: public int getIdFirst() { tom@8273: return this.idFirst; tom@8273: } tom@8273: tom@8273: /** Get id of the second BedHeight (subtrahend). */ tom@8273: public int getIdSecond() { tom@8273: return this.idSecond; tom@8273: } tom@8273: teichmann@8420: /* 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: } teichmann@8420: */ 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) { tom@8169: this.diffsPerYear.add(value); rrenkert@4636: } rrenkert@4636: teichmann@8420: /* 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: } teichmann@8420: */ 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(), tom@8169: diffsPerYear.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 :