Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10311)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10367)
@@ -3,5 +3,4 @@
 using System.Linq;
 using HeuristicLab.Data;
-using System.Collections;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -17,39 +16,39 @@
     }
 
-    public void ReplaceIndicesByValue<T>(string variableName, IEnumerable<int> indices, T value) {
-      foreach (int index in indices) {
-        preprocessingData.SetCell<T>(variableName, index, value);
+    public void ReplaceIndicesByValue<T>(int columnIndex, IEnumerable<int> rowIndices, T value) {
+      foreach (int index in rowIndices) {
+        preprocessingData.SetCell<T>(columnIndex, index, value);
       }
     }
 
-    public void ReplaceIndicesByAverageValue(string variableName, IEnumerable<int> indices) {
-      double average = statisticInfo.GetAverage(variableName);
-      ReplaceIndicesByValue<double>(variableName, indices, average);
+    public void ReplaceIndicesByAverageValue(int columnIndex, IEnumerable<int> rowIndices) {
+      double average = statisticInfo.GetAverage(columnIndex);
+      ReplaceIndicesByValue<double>(columnIndex, rowIndices, average);
     }
 
-    public void ReplaceIndicesByMedianValue(string variableName, IEnumerable<int> indices) {
-      double median = statisticInfo.GetMedian(variableName);
-      ReplaceIndicesByValue<double>(variableName, indices, median);
+    public void ReplaceIndicesByMedianValue(int columnIndex, IEnumerable<int> rowIndices) {
+      double median = statisticInfo.GetMedian(columnIndex);
+      ReplaceIndicesByValue<double>(columnIndex, rowIndices, median);
     }
 
-    public void ReplaceIndicesByRandomValue(string variableName, IEnumerable<int> indices) {
+    public void ReplaceIndicesByRandomValue(int columnIndex, IEnumerable<int> rowIndices) {
       Random r = new Random();
 
-      double max = statisticInfo.GetMax<double>(variableName);
-      double min = statisticInfo.GetMin<double>(variableName);
+      double max = statisticInfo.GetMax<double>(columnIndex);
+      double min = statisticInfo.GetMin<double>(columnIndex);
       double randMultiplier = (max - min);
-      foreach (int index in indices) {
+      foreach (int index in rowIndices) {
         double rand = r.NextDouble() * randMultiplier + min;
-        preprocessingData.SetCell<double>(variableName, index, rand);
+        preprocessingData.SetCell<double>(columnIndex, index, rand);
       }
     }
 
-    public void ReplaceIndicesByLinearInterpolationOfNeighbours(string variableName, IEnumerable<int> indices) {
-      int countValues = preprocessingData.GetValues<double>(variableName).Count();
-      foreach (int index in indices) {
+    public void ReplaceIndicesByLinearInterpolationOfNeighbours(int columnIndex, IEnumerable<int> rowIndices) {
+      int countValues = preprocessingData.GetValues<double>(columnIndex).Count();
+      foreach (int index in rowIndices) {
         // dont replace first or last values
         if (index > 0 && index < countValues) {
-          int prevIndex = indexOfPrevPresentValue(variableName, index);
-          int nextIndex = indexOfNextPresentValue(variableName, index);
+          int prevIndex = indexOfPrevPresentValue(columnIndex, index);
+          int nextIndex = indexOfNextPresentValue(columnIndex, index);
 
           // no neighbours found
@@ -57,6 +56,6 @@
             continue;
           }
-          double prev = preprocessingData.GetCell<double>(variableName, prevIndex);
-          double next = preprocessingData.GetCell<double>(variableName, nextIndex);
+          double prev = preprocessingData.GetCell<double>(columnIndex, prevIndex);
+          double next = preprocessingData.GetCell<double>(columnIndex, nextIndex);
 
           int valuesToInterpolate = nextIndex - prevIndex;
@@ -66,5 +65,5 @@
           for (int i = prevIndex; i < nextIndex; ++i) {
             double interpolated = prev + (interpolationStep * (i - prevIndex));
-            preprocessingData.SetCell<double>(variableName, i, interpolated);
+            preprocessingData.SetCell<double>(columnIndex, i, interpolated);
           }
         }
@@ -72,7 +71,7 @@
     }
 
-    private int indexOfPrevPresentValue(string variableName, int start) {
+    private int indexOfPrevPresentValue(int columnIndex, int start) {
       int offset = start - 1;
-      while (offset >= 0 && searchLogic.IsMissingValue(variableName, offset)) {
+      while (offset >= 0 && searchLogic.IsMissingValue(columnIndex, offset)) {
         offset--;
       }
@@ -81,7 +80,7 @@
     }
 
-    private int indexOfNextPresentValue(string variableName, int start) {
+    private int indexOfNextPresentValue(int columnIndex, int start) {
       int offset = start + 1;
-      while (offset < preprocessingData.Rows && searchLogic.IsMissingValue(variableName, offset)) {
+      while (offset < preprocessingData.Rows && searchLogic.IsMissingValue(columnIndex, offset)) {
         offset++;
       }
@@ -90,13 +89,13 @@
     }
 
-    public void ReplaceIndicesByMostCommonValue(string variableName, IEnumerable<int> indices) {
-      if (preprocessingData.IsType<double>(variableName)) {
-        ReplaceIndicesByValue<double>(variableName, indices, statisticInfo.GetMostCommonValue<double>(variableName));
-      } else if (preprocessingData.IsType<string>(variableName)) {
-        ReplaceIndicesByValue<string>(variableName, indices, statisticInfo.GetMostCommonValue<string>(variableName));
-      } else if (preprocessingData.IsType<DateTime>(variableName)) {
-        ReplaceIndicesByValue<DateTime>(variableName, indices, statisticInfo.GetMostCommonValue<DateTime>(variableName));
+    public void ReplaceIndicesByMostCommonValue(int columnIndex, IEnumerable<int> rowIndices) {
+      if (preprocessingData.IsType<double>(columnIndex)) {
+        ReplaceIndicesByValue<double>(columnIndex, rowIndices, statisticInfo.GetMostCommonValue<double>(columnIndex));
+      } else if (preprocessingData.IsType<string>(columnIndex)) {
+        ReplaceIndicesByValue<string>(columnIndex, rowIndices, statisticInfo.GetMostCommonValue<string>(columnIndex));
+      } else if (preprocessingData.IsType<DateTime>(columnIndex)) {
+        ReplaceIndicesByValue<DateTime>(columnIndex, rowIndices, statisticInfo.GetMostCommonValue<DateTime>(columnIndex));
       } else {
-        throw new ArgumentException("column with index: " + variableName + " contains a non supported type.");
+        throw new ArgumentException("column with index: " + columnIndex + " contains a non supported type.");
       }
     }
@@ -131,18 +130,18 @@
 
     public void reOrderToIndices(IList<System.Tuple<int, int>> indices) {
-      foreach (string variableName in preprocessingData.VariableNames) {
-        if (preprocessingData.IsType<double>(variableName)) {
-          reOrderToIndices<double>(variableName, indices);
-        } else if (preprocessingData.IsType<string>(variableName)) {
-          reOrderToIndices<string>(variableName, indices);
-        } else if (preprocessingData.IsType<DateTime>(variableName)) {
-          reOrderToIndices<DateTime>(variableName, indices);
+      for (int i = 0; i < preprocessingData.Columns; ++i) {
+        if (preprocessingData.IsType<double>(i)) {
+          reOrderToIndices<double>(i, indices);
+        } else if (preprocessingData.IsType<string>(i)) {
+          reOrderToIndices<string>(i, indices);
+        } else if (preprocessingData.IsType<DateTime>(i)) {
+          reOrderToIndices<DateTime>(i, indices);
         }
       }
     }
 
-    private void reOrderToIndices<T>(string variableName, IList<Tuple<int, int>> indices) {
+    private void reOrderToIndices<T>(int columnIndex, IList<Tuple<int, int>> indices) {
 
-      List<T> originalData = new List<T>(preprocessingData.GetValues<T>(variableName));
+      List<T> originalData = new List<T>(preprocessingData.GetValues<T>(columnIndex));
 
       // process all columns equally
@@ -152,5 +151,5 @@
 
         T replaceValue = originalData.ElementAt<T>(replaceIndex);
-        preprocessingData.SetCell<T>(variableName, originalIndex, replaceValue);
+        preprocessingData.SetCell<T>(columnIndex, originalIndex, replaceValue);
       }
     }
