comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQKms.java @ 366:d64339f9f38f

WQKms model: Added a get() method which takes destination array as an argument. flys-artifacts/trunk@1774 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 29 Apr 2011 08:39:17 +0000
parents c13ca9d632d6
children 0960df8358ec
comparison
equal deleted inserted replaced
365:c13ca9d632d6 366:d64339f9f38f
50 * @param idx The position of the triple. 50 * @param idx The position of the triple.
51 * 51 *
52 * @return a triple of [W, Q, Kms]. 52 * @return a triple of [W, Q, Kms].
53 */ 53 */
54 public double[] get(int idx) { 54 public double[] get(int idx) {
55 return new double[] { w.get(idx), q.get(idx), kms.get(idx) }; 55 return get(idx, new double[3]);
56 }
57
58 /**
59 * This method returns a triple of W, Q and Kms in a single 3dim array.
60 *
61 * @param idx The position of the triple.
62 * @param dst destination array
63 *
64 * @return a triple of [W, Q, Kms] in dst.
65 */
66 public double[] get(int idx, double [] dst) {
67 dst[0] = w .get(idx);
68 dst[1] = q .get(idx);
69 dst[2] = kms.get(idx);
70 return dst;
56 } 71 }
57 } 72 }
58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 73 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org