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; rrenkert@8422: protected TDoubleArrayList dataGap1; rrenkert@8422: protected TDoubleArrayList dataGap2; rrenkert@8422: protected TDoubleArrayList soundingWidth1; rrenkert@8422: protected TDoubleArrayList soundingWidth2; 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(); rrenkert@8422: this.dataGap1 = new TDoubleArrayList(); rrenkert@8422: this.dataGap2 = new TDoubleArrayList(); rrenkert@8422: this.soundingWidth1 = new TDoubleArrayList(); rrenkert@8422: this.soundingWidth2 = 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, rrenkert@8422: TDoubleArrayList soundingWidth1, rrenkert@8422: TDoubleArrayList soundingWidth2, tom@8169: TDoubleArrayList diffsPerYear, rrenkert@8422: TDoubleArrayList dataGap1, rrenkert@8422: TDoubleArrayList dataGap2, 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; rrenkert@8422: this.dataGap1 = dataGap1; rrenkert@8422: this.dataGap2 = dataGap2; rrenkert@8422: this.soundingWidth1 = soundingWidth1; rrenkert@8422: this.soundingWidth2 = soundingWidth2; 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: rrenkert@8422: public TDoubleArrayList getDataGap1() { rrenkert@8422: return this.dataGap1; rrenkert@8422: } rrenkert@8422: rrenkert@8422: public TDoubleArrayList getDataGap2() { rrenkert@8422: return this.dataGap2; raimund@3887: } raimund@3898: rrenkert@8422: public TDoubleArrayList getSoundingWidth1() { rrenkert@8422: return this.soundingWidth1; rrenkert@8422: } rrenkert@8422: rrenkert@8422: public TDoubleArrayList getSoundingWidth2() { rrenkert@8422: return this.soundingWidth2; 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: rrenkert@8422: public void addSoundingWidth1(double value) { rrenkert@8422: this.soundingWidth1.add(value); rrenkert@8422: } rrenkert@8422: rrenkert@8422: public void addSoundingWidth2(double value) { rrenkert@8422: this.soundingWidth2.add(value); rrenkert@4636: } rrenkert@4636: rrenkert@4636: public void addBedHeights(double value) { tom@8169: this.diffsPerYear.add(value); rrenkert@4636: } rrenkert@4636: rrenkert@8422: public double[][] getSoundingWidth1Data() { rrenkert@7829: return new double[][] { rrenkert@7829: kms.toNativeArray(), rrenkert@8422: soundingWidth1.toNativeArray() rrenkert@8422: }; rrenkert@8422: } rrenkert@8422: rrenkert@8422: public double[][] getSoundingWidth2Data() { rrenkert@8422: return new double[][] { rrenkert@8422: kms.toNativeArray(), rrenkert@8422: soundingWidth2.toNativeArray() rrenkert@8422: }; rrenkert@8422: } rrenkert@8422: rrenkert@8422: public double[][] getDataGap1Data() { rrenkert@8422: return new double[][] { rrenkert@8422: kms.toNativeArray(), rrenkert@8422: dataGap1.toNativeArray() rrenkert@8422: }; rrenkert@8422: } rrenkert@8422: rrenkert@8422: public double[][] getDataGap2Data() { rrenkert@8422: return new double[][] { rrenkert@8422: kms.toNativeArray(), rrenkert@8422: dataGap2.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 :