Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SieveArray.java @ 4837:9e25c7523485
Fixed calculation of effective width in MINFO SQ relation.
* Get all (including empty datasets) from db.
* Filter empty datasets when processing data of the same date.
* Added debug outputs.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 23 Jan 2013 11:14:41 +0100 |
parents | bf2fd9c58ac4 |
children |
comparison
equal
deleted
inserted
replaced
4814:47c529e2be26 | 4837:9e25c7523485 |
---|---|
1 package de.intevation.flys.artifacts.model.sq; | 1 package de.intevation.flys.artifacts.model.sq; |
2 | |
3 import java.util.Arrays; | |
4 | |
5 import org.apache.log4j.Logger; | |
2 | 6 |
3 public class SieveArray | 7 public class SieveArray |
4 { | 8 { |
9 private static final Logger log = | |
10 Logger.getLogger(SieveArray.class); | |
11 | |
5 public static final double EPSILON = 1e-8; | 12 public static final double EPSILON = 1e-8; |
6 | 13 |
7 public static final double [] SIEVE_DIAMETERS = { | 14 public static final double [] SIEVE_DIAMETERS = { |
8 100d, 63d, 31.5d, 16d, | 15 100d, 63d, 31.5d, 16d, |
9 8d, 4d, 2d, 1d, | 16 8d, 4d, 2d, 1d, |
47 } | 54 } |
48 total = 1d/total; | 55 total = 1d/total; |
49 for (int i = 0; i < normLoads.length; ++i) { | 56 for (int i = 0; i < normLoads.length; ++i) { |
50 normLoads[i] = total*loads[i]; | 57 normLoads[i] = total*loads[i]; |
51 } | 58 } |
59 log.debug("calculated norm loads: " + Arrays.toString(normLoads)); | |
52 } | 60 } |
53 | 61 |
54 public void adjust(double eight, double four) { | 62 public void adjust(double eight, double four) { |
55 this.normLoads[4] = eight; | 63 this.normLoads[4] = eight; |
56 this.normLoads[5] = four; | 64 this.normLoads[5] = four; |