Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java @ 7031:7ee382b3f839
Doc.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 17 Sep 2013 11:45:44 +0200 |
parents | a18a43764793 |
children | f4d6ef50665a |
comparison
equal
deleted
inserted
replaced
7030:6205fe683ac7 | 7031:7ee382b3f839 |
---|---|
126 } | 126 } |
127 return null; | 127 return null; |
128 } | 128 } |
129 | 129 |
130 /** | 130 /** |
131 * @param[out] resLoad resulting SedimentLoad | 131 * Take Loads and build average of all fractions at given km. |
132 * The average fractions value is set in resLoad. | |
133 * | |
134 * @param km km at which to build fractions average. | |
135 * @param epochLoads the loads to build average over. | |
136 * @param[out] resLoad resulting SedimentLoad. | |
132 */ | 137 */ |
133 private void calculateEpochKm( | 138 private void calculateEpochKm( |
134 List<SedimentLoad> epochLoads, | 139 List<SedimentLoad> epochLoads, |
135 SedimentLoad resLoad, | 140 SedimentLoad resLoad, |
136 double km | 141 double km |
174 sseSum++; | 179 sseSum++; |
175 } | 180 } |
176 } | 181 } |
177 | 182 |
178 SedimentLoadFraction fr = resLoad.getFraction(km); | 183 SedimentLoadFraction fr = resLoad.getFraction(km); |
179 // Prevent divisions by zero, the fraction defaults to 0d. | 184 // Prevent divisions by zero. |
180 if (cSum != 0) { | 185 if (cSum != 0) { |
181 resLoad.setCoarse(km, fr.getCoarse()/cSum, fr.getCoarseRange()); | 186 resLoad.setCoarse(km, fr.getCoarse()/cSum, fr.getCoarseRange()); |
182 } | 187 } |
183 if (fmSum != 0) { | 188 if (fmSum != 0) { |
184 resLoad.setFineMiddle(km, fr.getFineMiddle()/fmSum, | 189 resLoad.setFineMiddle(km, fr.getFineMiddle()/fmSum, |