Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs	(revision 6740)
@@ -31,11 +31,16 @@
 
       double[,] matrix = new double[rowsList.Count, variablesList.Count];
-      for (int row = 0; row < rowsList.Count; row++) {
-        int col = 0;
-        foreach (string column in variables) {
-          matrix[row, col] = dataset[column, rowsList[row]];
-          col++;
+
+      int col = 0;
+      foreach (string column in variables) {
+        var values = dataset.GetDoubleValues(column, rows);
+        int row = 0;
+        foreach (var value in values) {
+          matrix[row, col] = value;
+          row++;
         }
+        col++;
       }
+
       return matrix;
     }
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 6740)
@@ -78,5 +78,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 6740)
@@ -96,5 +96,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 6740)
@@ -192,5 +192,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 6740)
@@ -178,5 +178,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 6740)
@@ -108,5 +108,5 @@
       int nCols = inputMatrix.GetLength(1);
       int info;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 6740)
@@ -34,6 +34,5 @@
     public static SVM.Problem CreateSvmProblem(Dataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) {
       double[] targetVector =
-        dataset.GetEnumeratedVariableValues(targetVariable, rowIndices)
-        .ToArray();
+        dataset.GetDoubleValues(targetVariable, rowIndices).ToArray();
 
       SVM.Node[][] nodes = new SVM.Node[targetVector.Length][];
@@ -46,5 +45,5 @@
         int colIndex = 1; // make sure the smallest node index for SVM = 1
         foreach (var inputVariable in inputVariablesList) {
-          double value = dataset[row, dataset.GetVariableIndex(inputVariable)];
+          double value = dataset.GetDoubleValue(inputVariable, row);
           // SVM also works with missing values
           // => don't add NaN values in the dataset to the sparse SVM matrix representation
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs	(revision 6740)
@@ -20,8 +20,8 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Problems.DataAnalysis;
-using System;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
@@ -42,5 +42,5 @@
           int col = 0;
           foreach (var inputVariable in allowedInputVariables) {
-            double d = center[col++] - dataset[inputVariable, row];
+            double d = center[col++] - dataset.GetDoubleValue(inputVariable, row);
             d = d * d; // square;
             centerDistance += d;
@@ -73,5 +73,5 @@
         double[] p = new double[allowedInputVariables.Count];
         for (int i = 0; i < nCols; i++) {
-          p[i] = dataset[allowedInputVariables[i], row];
+          p[i] = dataset.GetDoubleValue(allowedInputVariables[i], row);
         }
         clusterPoints[clusterValues[clusterValueIndex++]].Add(p);
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 6740)
@@ -30,6 +30,6 @@
     // number of arguments of the current instruction
     public byte nArguments;
-    // an optional short value (addresses for calls, argument index for arguments)
-    public ushort iArg0;
+    // an optional object value (addresses for calls, argument index for arguments)
+    public object iArg0;
   }
 }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 6740)
@@ -73,5 +73,5 @@
       List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList();
 
-      var targetClassValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetClassValues = dataset.GetDoubleValues(targetVariable, rows);
       var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
         .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit)
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6740)
@@ -33,5 +33,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 6740)
@@ -74,5 +74,5 @@
     private void UpdateEstimationLimits() {
       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
         var mean = targetValues.Average();
         var range = targetValues.Max() - targetValues.Min();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 6740)
@@ -73,5 +73,5 @@
     private void UpdateEstimationLimits() {
       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
         var mean = targetValues.Average();
         var range = targetValues.Max() - targetValues.Min();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs	(revision 6740)
@@ -127,5 +127,5 @@
       var rows = problemData.TrainingIndizes;
       var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       double alpha;
       double beta;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 6740)
@@ -72,5 +72,5 @@
       var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
         .ToArray();
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       OnlineCalculatorError errorState;
       double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput, out errorState);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6740)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 6740)
@@ -78,5 +78,5 @@
     private void UpdateEstimationLimits() {
       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
         var mean = targetValues.Average();
         var range = targetValues.Max() - targetValues.Min();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6740)
@@ -56,5 +56,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6740)
@@ -56,5 +56,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 6740)
@@ -75,5 +75,5 @@
     private void UpdateEstimationLimits() {
       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
         var mean = targetValues.Average();
         var range = targetValues.Max() - targetValues.Min();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs	(revision 6740)
@@ -73,5 +73,5 @@
       var rows = problemData.TrainingIndizes;
       var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       double alpha;
       double beta;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs	(revision 6740)
@@ -27,8 +27,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.MainForm;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
@@ -88,10 +86,10 @@
         select varNode.VariableName)
          .Distinct()
-         .OrderBy(x=>x)
+         .OrderBy(x => x)
          .ToList();
 
         medianValues.Clear();
         foreach (var variableName in referencedVariables) {
-          medianValues.Add(variableName, Content.ProblemData.Dataset.GetEnumeratedVariableValues(variableName).Median());
+          medianValues.Add(variableName, Content.ProblemData.Dataset.GetDoubleValues(variableName).Median());
         }
 
@@ -107,5 +105,5 @@
       foreach (var variableName in variableNames) {
         var variableTrackbar = new VariableTrackbar(variableName,
-                                                    Content.ProblemData.Dataset.GetEnumeratedVariableValues(variableName));
+                                                    Content.ProblemData.Dataset.GetDoubleValues(variableName));
         variableTrackbar.Size = new Size(variableTrackbar.Size.Width, flowLayoutPanel.Size.Height - 23);
         variableTrackbar.ValueChanged += TrackBarValueChanged;
@@ -132,5 +130,5 @@
         .Except(new string[] { freeVariable });
 
-      var freeVariableValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
+      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
       var responseValues = Content.Model.Interpreter.GetSymbolicExpressionTreeValues(clonedTree,
                                                                               Content.ProblemData.Dataset,
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 6740)
@@ -26,8 +26,8 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
@@ -224,13 +224,13 @@
         if (instr.opCode == OpCodes.Variable) {
           var variableTreeNode = instr.dynamicNode as VariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.LagVariable) {
           var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.VariableCondition) {
           var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
         } else if (instr.opCode == OpCodes.Call) {
           necessaryArgStackSize += instr.nArguments + 1;
@@ -468,13 +468,13 @@
           }
         case OpCodes.Variable: {
-            VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;
-            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // load dataset
-            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, 0); // sampleOffset
-            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // sampleIndex
-            il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset
-            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, currentInstr.iArg0); // load var
-            il.Emit(System.Reflection.Emit.OpCodes.Call, datasetGetValue); // dataset.GetValue
-            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
-            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            //VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;
+            //il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // load dataset
+            //il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, 0); // sampleOffset
+            //il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // sampleIndex
+            //il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset
+            //il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, currentInstr.iArg0); // load var
+            //il.Emit(System.Reflection.Emit.OpCodes.Call, datasetGetValue); // dataset.GetValue
+            //il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+            //il.Emit(System.Reflection.Emit.OpCodes.Mul);
             return;
           }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6740)
@@ -24,8 +24,8 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
@@ -208,13 +208,13 @@
         if (instr.opCode == OpCodes.Variable) {
           var variableTreeNode = instr.dynamicNode as VariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.LagVariable) {
-          var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          var laggedVariableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.VariableCondition) {
           var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
         } else if (instr.opCode == OpCodes.Call) {
           necessaryArgStackSize += instr.nArguments + 1;
@@ -390,5 +390,5 @@
             int savedPc = state.ProgramCounter;
             // set pc to start of function  
-            state.ProgramCounter = currentInstr.iArg0;
+            state.ProgramCounter = (ushort)currentInstr.iArg0;
             // evaluate the function
             double v = Evaluate(dataset, ref row, state);
@@ -402,18 +402,18 @@
           }
         case OpCodes.Arg: {
-            return state.GetStackFrameValue(currentInstr.iArg0);
+            return state.GetStackFrameValue((ushort)currentInstr.iArg0);
           }
         case OpCodes.Variable: {
             if (row < 0 || row >= dataset.Rows)
               return double.NaN;
-            var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode;
-            return dataset[row, currentInstr.iArg0] * variableTreeNode.Weight;
+            var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
+            return ((IList<double>)currentInstr.iArg0)[row] * variableTreeNode.Weight;
           }
         case OpCodes.LagVariable: {
-            var laggedVariableTreeNode = currentInstr.dynamicNode as LaggedVariableTreeNode;
+            var laggedVariableTreeNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
             int actualRow = row + laggedVariableTreeNode.Lag;
             if (actualRow < 0 || actualRow >= dataset.Rows)
               return double.NaN;
-            return dataset[actualRow, currentInstr.iArg0] * laggedVariableTreeNode.Weight;
+            return ((IList<double>)currentInstr.iArg0)[row] * laggedVariableTreeNode.Weight;
           }
         case OpCodes.Constant: {
@@ -428,5 +428,5 @@
               return double.NaN;
             var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
-            double variableValue = dataset[row, currentInstr.iArg0];
+            double variableValue = ((IList<double>)currentInstr.iArg0)[row];
             double x = variableValue - variableConditionTreeNode.Threshold;
             double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 6740)
@@ -98,5 +98,5 @@
       int modelCount = Content.Model.Models.Count();
       string[,] values = new string[indizes.Length, 5 + classValuesCount + modelCount];
-      double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+      double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
       List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indizes,
                                                             Content.ClassificationSolutions);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 6740)
@@ -114,5 +114,5 @@
         } else throw new InvalidOperationException();
 
-        double[] targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double[] targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
 
         Dictionary<double, int> classValueIndexMapping = new Dictionary<double, int>();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs	(revision 6740)
@@ -86,5 +86,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 5];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           double[] estimated = Content.EstimatedClassValues.ToArray();
           for (int row = 0; row < target.Length; row++) {
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 6740)
@@ -107,5 +107,5 @@
 
         double[] estimatedValues = Content.GetEstimatedValues(rows).ToArray();
-        double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double[] targetClassValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
         double minThreshold = estimatedValues.Min();
         double maxThreshold = estimatedValues.Max();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs	(revision 6740)
@@ -51,5 +51,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 4];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           double[] estimatedClassValues = Content.EstimatedClassValues.ToArray();
           double[] estimatedValues = Content.EstimatedValues.ToArray();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 6740)
@@ -135,7 +135,9 @@
     private void FillSeriesWithDataPoints(Series series) {
       List<double> estimatedValues = Content.EstimatedValues.ToList();
+      var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToList();
+
       foreach (int row in Content.ProblemData.TrainingIndizes) {
         double estimatedValue = estimatedValues[row];
-        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
+        double targetValue = targetValues[row];
         if (targetValue.IsAlmost((double)series.Tag)) {
           double jitterValue = random.NextDouble() * 2.0 - 1.0;
@@ -150,6 +152,6 @@
       foreach (int row in Content.ProblemData.TestIndizes) {
         double estimatedValue = estimatedValues[row];
-        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
-        if (targetValue == (double)series.Tag) {
+        double targetValue = targetValues[row];
+        if (targetValue.IsAlmost((double)series.Tag)) {
           double jitterValue = random.NextDouble() * 2.0 - 1.0;
           DataPoint point = new DataPoint();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs	(revision 6740)
@@ -85,6 +85,5 @@
           int[] clusters = Content.Model.GetClusterValues(Content.ProblemData.Dataset, Enumerable.Range(0, Content.ProblemData.Dataset.Rows)).ToArray();
           var dataset = Content.ProblemData.Dataset;
-          int columns = Content.ProblemData.AllowedInputVariables.Count() + 1;
-          var columnsIndixes = Content.ProblemData.AllowedInputVariables.Select(x => dataset.GetVariableIndex(x)).ToList();
+          int columns = Content.ProblemData.AllowedInputVariables.Count() + 1;          
 
           double[,] values = new double[dataset.Rows, columns];
@@ -93,6 +92,6 @@
 
             int column = 1;
-            foreach (int columnIndex in columnsIndixes) {
-              values[row, column] = dataset[row, columnIndex];
+            foreach (var columnName in Content.ProblemData.AllowedInputVariables) {
+              values[row, column] = dataset.GetDoubleValue(columnName, row);
               column++;
             }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6740)
@@ -164,11 +164,11 @@
       switch (cmbSamples.SelectedItem.ToString()) {
         case TrainingSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
           break;
         case TestSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
           break;
         case AllSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable);
           break;
         default:
@@ -197,5 +197,5 @@
 
     protected IEnumerable<double> GetMeanModelEstimatedValues(IEnumerable<double> originalValues) {
-      double averageTrainingTarget = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
+      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
       return Enumerable.Repeat(averageTrainingTarget, originalValues.Count());
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs	(revision 6740)
@@ -88,5 +88,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 7];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           var estimated = Content.EstimatedValues.GetEnumerator();
           var estimated_training = Content.EstimatedTrainingValues.GetEnumerator();
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs	(revision 6740)
@@ -67,5 +67,5 @@
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
-          Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable));
+          Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray());
 
         this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 6740)
@@ -130,14 +130,14 @@
         if (this.chart.Series[ALL_SERIES].Points.Count > 0)
           this.chart.Series[ALL_SERIES].Points.DataBindXY(Content.EstimatedValues.ToArray(), "",
-            dataset.GetVariableValues(targetVariableName), "");
+            dataset.GetDoubleValues(targetVariableName).ToArray(), "");
         if (this.chart.Series[TRAINING_SERIES].Points.Count > 0)
           this.chart.Series[TRAINING_SERIES].Points.DataBindXY(Content.EstimatedTrainingValues.ToArray(), "",
-            dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray(), "");
+            dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray(), "");
         if (this.chart.Series[TEST_SERIES].Points.Count > 0)
           this.chart.Series[TEST_SERIES].Points.DataBindXY(Content.EstimatedTestValues.ToArray(), "",
-           dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray(), "");
-
-        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetVariableValues(targetVariableName)))).Max();
-        double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetVariableValues(targetVariableName)))).Min();
+           dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray(), "");
+
+        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Max();
+        double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Min();
 
         max = max + 0.2 * Math.Abs(max);
@@ -177,13 +177,13 @@
           case ALL_SERIES:
             predictedValues = Content.EstimatedValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetVariableValues(targetVariableName);
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName).ToArray();
             break;
           case TRAINING_SERIES:
             predictedValues = Content.EstimatedTrainingValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray();
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray();
             break;
           case TEST_SERIES:
             predictedValues = Content.EstimatedTestValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray();
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray();
             break;
         }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 6740)
@@ -21,5 +21,7 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using HeuristicLab.Common;
@@ -36,10 +38,9 @@
     private Dataset(Dataset original, Cloner cloner)
       : base(original, cloner) {
-      variableNameToVariableIndexMapping = original.variableNameToVariableIndexMapping;
-      data = original.data;
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Dataset(this, cloner);
-    }
+      variableValues = new Dictionary<string, IList>(original.variableValues);
+      variableNames = new List<string>(original.variableNames);
+      rows = original.rows;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Dataset(this, cloner); }
 
     public Dataset()
@@ -47,120 +48,160 @@
       Name = "-";
       VariableNames = Enumerable.Empty<string>();
-      data = new double[0, 0];
-    }
-
-    public Dataset(IEnumerable<string> variableNames, double[,] data)
+      variableValues = new Dictionary<string, IList>();
+      rows = 0;
+    }
+
+    public Dataset(IEnumerable<string> variableNames, IEnumerable<IList> variableValues)
       : base() {
       Name = "-";
-      if (variableNames.Count() != data.GetLength(1)) {
-        throw new ArgumentException("Number of variable names doesn't match the number of columns of data");
-      }
-      this.data = (double[,])data.Clone();
-      VariableNames = variableNames;
-    }
-
-
-    private Dictionary<string, int> variableNameToVariableIndexMapping;
-    private Dictionary<int, string> variableIndexToVariableNameMapping;
+      if (!variableNames.Any()) {
+        this.variableNames = Enumerable.Range(0, variableValues.Count()).Select(x => "Column " + x).ToList();
+      } else if (variableNames.Count() != variableValues.Count()) {
+        throw new ArgumentException("Number of variable names doesn't match the number of columns of variableValues");
+      } else if (!variableValues.All(list => list.Count == variableValues.First().Count)) {
+        throw new ArgumentException("The number of values must be equal for every variable");
+      } else if (variableNames.Distinct().Count() != variableNames.Count()) {
+        var duplicateVariableNames =
+          variableNames.GroupBy(v => v).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
+        string message = "The dataset cannot contain duplicate variables names: " + Environment.NewLine;
+        foreach (var duplicateVariableName in duplicateVariableNames)
+          message += duplicateVariableName + Environment.NewLine;
+        throw new ArgumentException(message);
+      }
+
+      rows = variableValues.First().Count;
+      this.variableNames = new List<string>(variableNames);
+      this.variableValues = new Dictionary<string, IList>();
+      for (int i = 0; i < this.variableNames.Count; i++) {
+        var values = variableValues.ElementAt(i);
+        IList clonedValues = null;
+        if (values is List<double>)
+          clonedValues = new List<double>(values.Cast<double>());
+        else if (values is List<string>)
+          clonedValues = new List<string>(values.Cast<string>());
+        else if (values is List<DateTime>)
+          clonedValues = new List<DateTime>(values.Cast<DateTime>());
+        else {
+          this.variableNames = new List<string>();
+          this.variableValues = new Dictionary<string, IList>();
+          throw new ArgumentException("The variable values must be of type List<double>, List<string> or List<DateTime>");
+        }
+        this.variableValues.Add(this.variableNames[i], clonedValues);
+      }
+    }
+
+    public Dataset(IEnumerable<string> variableNames, double[,] variableValues) {
+      Name = "-";
+      if (variableNames.Count() != variableValues.GetLength(1)) {
+        throw new ArgumentException("Number of variable names doesn't match the number of columns of variableValues");
+      }
+      if (variableNames.Distinct().Count() != variableNames.Count()) {
+        var duplicateVariableNames = variableNames.GroupBy(v => v).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
+        string message = "The dataset cannot contain duplicate variables names: " + Environment.NewLine;
+        foreach (var duplicateVariableName in duplicateVariableNames)
+          message += duplicateVariableName + Environment.NewLine;
+        throw new ArgumentException(message);
+      }
+
+      rows = variableValues.GetLength(0);
+      this.variableNames = new List<string>(variableNames);
+
+      this.variableValues = new Dictionary<string, IList>();
+      for (int col = 0; col < variableValues.GetLength(1); col++) {
+        string columName = this.variableNames[col];
+        var values = new List<double>();
+        for (int row = 0; row < variableValues.GetLength(0); row++) {
+          values.Add(variableValues[row, col]);
+        }
+        this.variableValues.Add(columName, values);
+      }
+    }
+
+    #region Backwards compatible code, remove with 3.5
+    private double[,] storableData;
+    //name alias used to suppport backwards compatibility
+    [Storable(Name = "data", AllowOneWay = true)]
+    private double[,] StorableData { set { storableData = value; } }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (variableValues == null) {
+        rows = storableData.GetLength(0);
+        variableValues = new Dictionary<string, IList>();
+        for (int col = 0; col < storableData.GetLength(1); col++) {
+          string columName = variableNames[col];
+          var values = new List<double>();
+          for (int row = 0; row < storableData.GetLength(0); row++) {
+            values.Add(storableData[row, col]);
+          }
+          variableValues.Add(columName, values);
+        }
+        storableData = null;
+      }
+    }
+    #endregion
+
+    private Dictionary<string, IList> variableValues;
+    private List<string> variableNames;
     [Storable]
     public IEnumerable<string> VariableNames {
-      get {
-        // convert KeyCollection to an array first for persistence
-        return variableNameToVariableIndexMapping.Keys.ToArray();
-      }
+      get { return variableNames; }
       private set {
-        if (variableNameToVariableIndexMapping != null) throw new InvalidOperationException("VariableNames can only be set once.");
-        this.variableNameToVariableIndexMapping = new Dictionary<string, int>();
-        this.variableIndexToVariableNameMapping = new Dictionary<int, string>();
-        int i = 0;
-        foreach (string variableName in value) {
-          this.variableNameToVariableIndexMapping.Add(variableName, i);
-          this.variableIndexToVariableNameMapping.Add(i, variableName);
-          i++;
-        }
-      }
-    }
-
+        if (variableNames != null) throw new InvalidOperationException();
+        variableNames = new List<string>(value);
+      }
+    }
+
+    public IEnumerable<string> DoubleVariables {
+      get { return variableValues.Where(p => p.Value is List<double>).Select(p => p.Key); }
+    }
+
+    public IEnumerable<double> GetDoubleValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+
+      //mkommend yield return used to enable lazy evaluation
+      foreach (double value in values)
+        yield return value;
+    }
+    public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+      return values.AsReadOnly();
+    }
+    public double GetDoubleValue(string variableName, int row) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+      return values[row];
+    }
+    public IEnumerable<double> GetDoubleValues(string variableName, IEnumerable<int> rows) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The varialbe " + variableName + " is not a double variable.");
+
+      foreach (int index in rows)
+        yield return values[index];
+    }
+
+    #region IStringConvertibleMatrix Members
     [Storable]
-    private double[,] data;
-    private double[,] Data {
-      get { return data; }
-    }
-
-    // elementwise access
-    public double this[int rowIndex, int columnIndex] {
-      get { return data[rowIndex, columnIndex]; }
-    }
-    public double this[string variableName, int rowIndex] {
-      get {
-        int columnIndex = GetVariableIndex(variableName);
-        return data[rowIndex, columnIndex];
-      }
-    }
-
-    public double[] GetVariableValues(int variableIndex) {
-      return GetVariableValues(variableIndex, 0, Rows);
-    }
-    public double[] GetVariableValues(string variableName) {
-      return GetVariableValues(GetVariableIndex(variableName), 0, Rows);
-    }
-    public double[] GetVariableValues(int variableIndex, int start, int end) {
-      return GetEnumeratedVariableValues(variableIndex, start, end).ToArray();
-    }
-    public double[] GetVariableValues(string variableName, int start, int end) {
-      return GetVariableValues(GetVariableIndex(variableName), start, end);
-    }
-
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex) {
-      return GetEnumeratedVariableValues(variableIndex, 0, Rows);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex, int start, int end) {
-      if (start < 0 || !(start <= end))
-        throw new ArgumentException("Start must be between 0 and end (" + end + ").");
-      if (end > Rows || end < start)
-        throw new ArgumentException("End must be between start (" + start + ") and dataset rows (" + Rows + ").");
-
-      for (int i = start; i < end; i++)
-        yield return data[i, variableIndex];
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex, IEnumerable<int> rows) {
-      foreach (int row in rows)
-        yield return data[row, variableIndex];
-    }
-
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), 0, Rows);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, int start, int end) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), start, end);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, IEnumerable<int> rows) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), rows);
-    }
-
-    public string GetVariableName(int variableIndex) {
-      try {
-        return variableIndexToVariableNameMapping[variableIndex];
-      }
-      catch (KeyNotFoundException ex) {
-        throw new ArgumentException("The variable index " + variableIndex + " was not found.", ex);
-      }
-    }
-    public int GetVariableIndex(string variableName) {
-      try {
-        return variableNameToVariableIndexMapping[variableName];
-      }
-      catch (KeyNotFoundException ex) {
-        throw new ArgumentException("The variable name " + variableName + " was not found.", ex);
-      }
-    }
-
-    #region IStringConvertibleMatrix Members
+    private int rows;
     public int Rows {
-      get { return data.GetLength(0); }
+      get { return rows; }
       set { throw new NotSupportedException(); }
     }
     public int Columns {
-      get { return data.GetLength(1); }
+      get { return variableNames.Count; }
       set { throw new NotSupportedException(); }
     }
@@ -184,5 +225,5 @@
 
     public string GetValue(int rowIndex, int columnIndex) {
-      return data[rowIndex, columnIndex].ToString();
+      return variableValues[variableNames[columnIndex]][rowIndex].ToString();
     }
     public bool SetValue(string value, int rowIndex, int columnIndex) {
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6740)
@@ -226,5 +226,5 @@
       get {
         if (classValues == null) {
-          classValues = Dataset.GetEnumeratedVariableValues(TargetVariableParameter.Value.Value).Distinct().ToList();
+          classValues = Dataset.GetDoubleValues(TargetVariableParameter.Value.Value).Distinct().ToList();
           classValues.Sort();
         }
@@ -291,6 +291,6 @@
     private static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
       int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
-      var validTargetVariables = (from v in dataset.VariableNames
-                                  let distinctValues = dataset.GetEnumeratedVariableValues(v)
+      var validTargetVariables = (from v in dataset.DoubleVariables
+                                  let distinctValues = dataset.GetDoubleValues(v)
                                     .Take(maxSamples)
                                     .Distinct()
@@ -410,5 +410,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
+      ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 6740)
@@ -67,7 +67,7 @@
     protected void CalculateResults() {
       double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values
-      double[] originalTrainingClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestClassValues = EstimatedTestClassValues.ToArray(); // cache values
-      double[] originalTestClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 6740)
@@ -103,7 +103,7 @@
     protected void CalculateRegressionResults() {
       double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
-      double[] originalTrainingValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values
-      double[] originalTestValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
@@ -132,5 +132,5 @@
       double[] classValues;
       double[] thresholds;
-      var targetClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
       AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
 
@@ -141,5 +141,5 @@
       double[] classValues;
       double[] thresholds;
-      var targetClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
       NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 6740)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -103,5 +99,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.VariableNames);
+      ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.DoubleVariables);
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6740)
@@ -116,8 +116,8 @@
       if (allowedInputVariables == null) throw new ArgumentNullException("The allowedInputVariables must not be null.");
 
-      if (allowedInputVariables.Except(dataset.VariableNames).Any())
-        throw new ArgumentException("All allowed input variables must be present in the dataset.");
+      if (allowedInputVariables.Except(dataset.DoubleVariables).Any())
+        throw new ArgumentException("All allowed input variables must be present in the dataset and of type double.");
 
-      var inputVariables = new CheckedItemList<StringValue>(dataset.VariableNames.Select(x => new StringValue(x)));
+      var inputVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Select(x => new StringValue(x)));
       foreach (StringValue x in inputVariables)
         inputVariables.SetItemCheckedState(x, allowedInputVariables.Contains(x.Value));
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6740)
@@ -144,5 +144,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
+      RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 6740)
@@ -127,5 +127,5 @@
         OnlineCalculatorError errorState;
         Add(new Result(TrainingMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the training partition", new DoubleValue()));
-        double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
+        double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
         TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN;
       }
@@ -134,5 +134,5 @@
         OnlineCalculatorError errorState;
         Add(new Result(TestMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the test partition", new DoubleValue()));
-        double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
+        double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
         TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
       }
@@ -142,7 +142,7 @@
     protected void CalculateResults() {
       double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
-      double[] originalTrainingValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values
-      double[] originalTestValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs	(revision 6740)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
@@ -33,5 +34,5 @@
     private readonly char[] POSSIBLE_SEPARATORS = new char[] { ',', ';', '\t' };
     private Tokenizer tokenizer;
-    private List<List<double>> rowValues;
+    private List<List<object>> rowValues;
 
     private int rows;
@@ -47,6 +48,6 @@
     }
 
-    private double[,] values;
-    public double[,] Values {
+    private List<IList> values;
+    public List<IList> Values {
       get {
         return values;
@@ -69,5 +70,5 @@
 
     public TableFileParser() {
-      rowValues = new List<List<double>>();
+      rowValues = new List<List<object>>();
       variableNames = new List<string>();
     }
@@ -75,8 +76,9 @@
     public void Parse(string fileName) {
       NumberFormatInfo numberFormat;
+      DateTimeFormatInfo dateTimeFormatInfo;
       char separator;
-      DetermineFileFormat(fileName, out numberFormat, out separator);
+      DetermineFileFormat(fileName, out numberFormat, out dateTimeFormatInfo, out separator);
       using (StreamReader reader = new StreamReader(fileName)) {
-        tokenizer = new Tokenizer(reader, numberFormat, separator);
+        tokenizer = new Tokenizer(reader, numberFormat, dateTimeFormatInfo, separator);
         // parse the file
         Parse();
@@ -86,18 +88,40 @@
       rows = rowValues.Count;
       columns = rowValues[0].Count;
-      values = new double[rows, columns];
-
-      int rowIndex = 0;
-      int columnIndex = 0;
-      foreach (List<double> row in rowValues) {
-        columnIndex = 0;
-        foreach (double element in row) {
-          values[rowIndex, columnIndex++] = element;
-        }
-        rowIndex++;
-      }
-    }
-
-    private void DetermineFileFormat(string fileName, out NumberFormatInfo numberFormat, out char separator) {
+      values = new List<IList>();
+
+      //create columns
+      for (int col = 0; col < columns; col++) {
+        var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(10).Select(v => v.GetType());
+        if (!types.Any()) {
+          values.Add(new List<string>());
+          continue;
+        }
+
+        var columnType = types.GroupBy(v => v).OrderBy(v => v).Last().Key;
+        if (columnType == typeof(double)) values.Add(new List<double>());
+        else if (columnType == typeof(DateTime)) values.Add(new List<DateTime>());
+        else if (columnType == typeof(string)) values.Add(new List<string>());
+        else throw new InvalidOperationException();
+      }
+
+
+
+      //fill with values
+      foreach (List<object> row in rowValues) {
+        int columnIndex = 0;
+        foreach (object element in row) {
+          //handle missing values with default values
+          if (element as string == string.Empty) {
+            if (values[columnIndex] is List<double>) values[columnIndex].Add(double.NaN);
+            else if (values[columnIndex] is List<DateTime>) values[columnIndex].Add(DateTime.MinValue);
+            else if (values[columnIndex] is List<string>) values[columnIndex].Add(string.Empty);
+            else throw new InvalidOperationException();
+          } else values[columnIndex].Add(element);
+          columnIndex++;
+        }
+      }
+    }
+
+    private void DetermineFileFormat(string fileName, out NumberFormatInfo numberFormat, out DateTimeFormatInfo dateTimeFormatInfo, out char separator) {
       using (StreamReader reader = new StreamReader(fileName)) {
         // skip first line
@@ -123,4 +147,5 @@
         if (OccurrencesOf(charCounts, '.') > 10) {
           numberFormat = NumberFormatInfo.InvariantInfo;
+          dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
           separator = POSSIBLE_SEPARATORS
             .Where(c => OccurrencesOf(charCounts, c) > 10)
@@ -139,4 +164,5 @@
             // English format (only integer values) with ',' as separator
             numberFormat = NumberFormatInfo.InvariantInfo;
+            dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
             separator = ',';
           } else {
@@ -144,4 +170,5 @@
             // German format (real values)
             numberFormat = NumberFormatInfo.GetInstance(new CultureInfo("de-DE"));
+            dateTimeFormatInfo = DateTimeFormatInfo.GetInstance(new CultureInfo("de-DE"));
             separator = POSSIBLE_SEPARATORS
               .Except(disallowedSeparators)
@@ -154,4 +181,5 @@
           // no points and no commas => English format
           numberFormat = NumberFormatInfo.InvariantInfo;
+          dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
           separator = POSSIBLE_SEPARATORS
             .Where(c => OccurrencesOf(charCounts, c) > 10)
@@ -169,5 +197,5 @@
     #region tokenizer
     internal enum TokenTypeEnum {
-      NewLine, Separator, String, Double
+      NewLine, Separator, String, Double, DateTime
     }
 
@@ -176,8 +204,10 @@
       public string stringValue;
       public double doubleValue;
+      public DateTime dateTimeValue;
 
       public Token(TokenTypeEnum type, string value) {
         this.type = type;
         stringValue = value;
+        dateTimeValue = DateTime.MinValue;
         doubleValue = 0.0;
       }
@@ -193,4 +223,5 @@
       private List<Token> tokens;
       private NumberFormatInfo numberFormatInfo;
+      private DateTimeFormatInfo dateTimeFormatInfo;
       private char separator;
       private const string INTERNAL_SEPARATOR = "#";
@@ -218,7 +249,8 @@
       }
 
-      public Tokenizer(StreamReader reader, NumberFormatInfo numberFormatInfo, char separator) {
+      public Tokenizer(StreamReader reader, NumberFormatInfo numberFormatInfo, DateTimeFormatInfo dateTimeFormatInfo, char separator) {
         this.reader = reader;
         this.numberFormatInfo = numberFormatInfo;
+        this.dateTimeFormatInfo = dateTimeFormatInfo;
         this.separator = separator;
         separatorToken = new Token(TokenTypeEnum.Separator, INTERNAL_SEPARATOR);
@@ -264,7 +296,10 @@
           token.type = TokenTypeEnum.Double;
           return token;
-        }
-
-        // couldn't parse the token as an int or float number so return a string token
+        } else if (DateTime.TryParse(strToken, out token.dateTimeValue)) {
+          token.type = TokenTypeEnum.DateTime;
+          return token;
+        }
+
+        // couldn't parse the token as an int or float number  or datetime value so return a string token
         return token;
       }
@@ -299,6 +334,8 @@
     private void ParseValues() {
       while (tokenizer.HasNext()) {
-        List<double> row = new List<double>();
-        row.Add(NextValue(tokenizer));
+        List<object> row = new List<object>();
+        object value = NextValue(tokenizer);
+        if (value == null) { tokenizer.Next(); continue; }
+        row.Add(value);
         while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
           Expect(tokenizer.SeparatorToken);
@@ -312,18 +349,21 @@
             "\nLine " + tokenizer.CurrentLineNumber + " has " + row.Count + " columns.", "", tokenizer.CurrentLineNumber);
         }
-        // add the current row to the collection of rows and start a new row
         rowValues.Add(row);
-        row = new List<double>();
-      }
-    }
-
-    private double NextValue(Tokenizer tokenizer) {
-      if (tokenizer.Peek() == tokenizer.SeparatorToken || tokenizer.Peek() == tokenizer.NewlineToken) return double.NaN;
+        row = new List<object>();
+      }
+    }
+
+    private object NextValue(Tokenizer tokenizer) {
+      if (tokenizer.Peek() == tokenizer.SeparatorToken) return string.Empty;
+      if (tokenizer.Peek() == tokenizer.NewlineToken) return null;
       Token current = tokenizer.Next();
-      if (current.type == TokenTypeEnum.Separator || current.type == TokenTypeEnum.String) {
+      if (current.type == TokenTypeEnum.Separator) {
         return double.NaN;
+      } else if (current.type == TokenTypeEnum.String) {
+        return current.stringValue;
       } else if (current.type == TokenTypeEnum.Double) {
-        // just take the value
         return current.doubleValue;
+      } else if (current.type == TokenTypeEnum.DateTime) {
+        return current.dateTimeValue;
       }
       // found an unexpected token => throw error 
@@ -334,24 +374,23 @@
 
     private void ParseVariableNames() {
-      // if the first line doesn't start with a double value then we assume that the
-      // first line contains variable names
-      if (tokenizer.HasNext() && tokenizer.Peek().type != TokenTypeEnum.Double) {
-
-        List<Token> tokens = new List<Token>();
-        Token valueToken;
+      //if first token is double no variables names are given
+      if (tokenizer.Peek().type == TokenTypeEnum.Double) return;
+
+      // the first line must contain variable names
+      List<Token> tokens = new List<Token>();
+      Token valueToken;
+      valueToken = tokenizer.Next();
+      tokens.Add(valueToken);
+      while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
+        Expect(tokenizer.SeparatorToken);
         valueToken = tokenizer.Next();
-        tokens.Add(valueToken);
-        while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
-          Expect(tokenizer.SeparatorToken);
-          valueToken = tokenizer.Next();
-          if (valueToken != tokenizer.NewlineToken) {
-            tokens.Add(valueToken);
-          }
-        }
         if (valueToken != tokenizer.NewlineToken) {
-          Expect(tokenizer.NewlineToken);
-        }
-        variableNames = tokens.Select(x => x.stringValue.Trim()).ToList();
-      }
+          tokens.Add(valueToken);
+        }
+      }
+      if (valueToken != tokenizer.NewlineToken) {
+        Expect(tokenizer.NewlineToken);
+      }
+      variableNames = tokens.Select(x => x.stringValue.Trim()).ToList();
     }
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs	(revision 6740)
@@ -80,5 +80,5 @@
       watch.Start();
       for (int i = 0; i < Repetitions; i++) {
-        double value = calculateFunc(dataset.GetEnumeratedVariableValues(0), dataset.GetEnumeratedVariableValues(1), out errorState);
+        double value = calculateFunc(dataset.GetDoubleValues("y"), dataset.GetDoubleValues("x0"), out errorState);
       }
       Assert.AreEqual(errorState, OnlineCalculatorError.None);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs	(revision 6739)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs	(revision 6740)
@@ -21,9 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using System.IO;
 using HeuristicLab.Problems.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 namespace HeuristicLab.Problems.DataAnalysis_3_4.Tests {
 
@@ -46,5 +44,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -68,5 +66,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -90,5 +88,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -113,5 +111,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -135,5 +133,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -157,5 +155,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -179,5 +177,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -202,5 +200,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -225,5 +223,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -248,5 +246,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -270,5 +268,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -292,5 +290,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -314,5 +312,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -336,5 +334,27 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    public void ParseWithEmtpyLines() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+"x01\t x02\t x03\t x04" + Environment.NewLine +
+"0\t 0\t 0\t 3" + Environment.NewLine +
+ Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine +
+" " + Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine + Environment.NewLine);
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName);
+        Assert.AreEqual(4, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
       }
       finally {
@@ -358,5 +378,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -380,5 +400,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -402,5 +422,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -424,5 +444,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -446,5 +466,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -468,5 +488,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
