changeset 2785:f87fcedbfa82

FixA: Fixed stupid index bug. flys-artifacts/trunk@4524 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sat, 26 May 2012 19:20:59 +0000 (2012-05-26)
parents 156214e3ca55
children f9e62e76ee1f
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sat May 26 16:55:15 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sat May 26 19:20:59 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-26	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
+	  Fixed stupid index bug.
+
 2012-05-26	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java	Sat May 26 16:55:15 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java	Sat May 26 19:20:59 2012 +0000
@@ -4,9 +4,13 @@
 
 import java.io.Serializable;
 
+import org.apache.log4j.Logger;
+
 public class Parameters
 implements   Serializable
 {
+    private static Logger log = Logger.getLogger(Parameters.class);
+
     protected String []           columnNames;
     protected TDoubleArrayList [] columns;
 
@@ -36,6 +40,7 @@
     public int newRow() {
 
         int N = columns[0].size();
+        log.debug("new row: " + N);
 
         for (int i = 0; i < columns.length; ++i) {
             columns[i].add(Double.NaN);
@@ -58,7 +63,7 @@
     public void set(int i, String columnName, double value) {
         int idx = columnIndex(columnName);
         if (idx >= 0) {
-            columns[i].setQuick(idx, value);
+            columns[idx].setQuick(i, value);
         }
     }
 

http://dive4elements.wald.intevation.org