Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQKms.java @ 447:5606ba4139e0
WSTs will now have a header that contains the names of the Ws or Qs that had been defined for the computation.
flys-artifacts/trunk@1939 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 18 May 2011 08:04:54 +0000 |
parents | eb22ffe4d74c |
children | 8b0152363bdb 3dc61e00385e |
comparison
equal
deleted
inserted
replaced
446:c0bec245f608 | 447:5606ba4139e0 |
---|---|
1 package de.intevation.flys.artifacts.model; | 1 package de.intevation.flys.artifacts.model; |
2 | |
3 import java.io.Serializable; | |
4 | 2 |
5 import gnu.trove.TDoubleArrayList; | 3 import gnu.trove.TDoubleArrayList; |
6 | 4 |
7 import org.apache.log4j.Logger; | 5 import org.apache.log4j.Logger; |
8 | 6 |
11 * This class represents a pool of data triples that consists of 'W', 'Q' and | 9 * This class represents a pool of data triples that consists of 'W', 'Q' and |
12 * 'KM' data. | 10 * 'KM' data. |
13 * | 11 * |
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 12 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
15 */ | 13 */ |
16 public class WQKms implements Serializable { | 14 public class WQKms extends NamedObject { |
17 | 15 |
18 private static Logger logger = Logger.getLogger(WQKms.class); | 16 private static Logger logger = Logger.getLogger(WQKms.class); |
19 | 17 |
20 | 18 |
21 /** The array that contains the 'W' values.*/ | 19 /** The array that contains the 'W' values.*/ |
27 /** The array that contains the 'KMs' values.*/ | 25 /** The array that contains the 'KMs' values.*/ |
28 protected TDoubleArrayList kms; | 26 protected TDoubleArrayList kms; |
29 | 27 |
30 | 28 |
31 public WQKms() { | 29 public WQKms() { |
30 this(""); | |
31 } | |
32 | |
33 | |
34 public WQKms(String name) { | |
35 super(name); | |
36 | |
32 this.w = new TDoubleArrayList(); | 37 this.w = new TDoubleArrayList(); |
33 this.q = new TDoubleArrayList(); | 38 this.q = new TDoubleArrayList(); |
34 this.kms = new TDoubleArrayList(); | 39 this.kms = new TDoubleArrayList(); |
35 } | 40 } |
36 | 41 |
42 | |
37 public WQKms(int capacity) { | 43 public WQKms(int capacity) { |
44 this(capacity, ""); | |
45 } | |
46 | |
47 | |
48 public WQKms(int capacity, String name) { | |
49 super(name); | |
50 | |
38 this.w = new TDoubleArrayList(capacity); | 51 this.w = new TDoubleArrayList(capacity); |
39 this.q = new TDoubleArrayList(capacity); | 52 this.q = new TDoubleArrayList(capacity); |
40 this.kms = new TDoubleArrayList(capacity); | 53 this.kms = new TDoubleArrayList(capacity); |
41 } | 54 } |
42 | 55 |
43 | 56 |
44 public WQKms(double[] kms, double[] qs, double[] ws) { | 57 public WQKms(double[] kms, double[] qs, double[] ws) { |
58 this(kms, qs, ws, ""); | |
59 } | |
60 | |
61 | |
62 public WQKms(double[] kms, double[] qs, double[] ws, String name) { | |
63 super(name); | |
64 | |
45 this.w = new TDoubleArrayList(ws); | 65 this.w = new TDoubleArrayList(ws); |
46 this.q = new TDoubleArrayList(qs); | 66 this.q = new TDoubleArrayList(qs); |
47 this.kms = new TDoubleArrayList(kms); | 67 this.kms = new TDoubleArrayList(kms); |
48 } | 68 } |
49 | 69 |