Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs	(revision 8729)
@@ -33,5 +33,4 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using FCE = HeuristicLab.Problems.DataAnalysis.FeatureCorrelationEnums;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -53,28 +52,28 @@
     }
 
-    public AbstractFeatureCorrelationView() {
+    protected AbstractFeatureCorrelationView() {
       InitializeComponent();
       sortedColumnIndices = new List<KeyValuePair<int, SortOrder>>();
       rowComparer = new StringConvertibleMatrixView.RowComparer();
       fcc = new FeatureCorrelationCalculator();
-      var calculatorList = FCE.EnumToList<FCE.CorrelationCalculators>().Select(x => new KeyValuePair<FCE.CorrelationCalculators, string>(x, FCE.GetEnumDescription(x))).ToList();
+      var calculatorList = FeatureCorrelationEnums.EnumToList<FeatureCorrelationEnums.CorrelationCalculators>().Select(x => new KeyValuePair<FeatureCorrelationEnums.CorrelationCalculators, string>(x, FeatureCorrelationEnums.GetEnumDescription(x))).ToList();
       CorrelationCalcComboBox.ValueMember = "Key";
       CorrelationCalcComboBox.DisplayMember = "Value";
-      CorrelationCalcComboBox.DataSource = new BindingList<KeyValuePair<FCE.CorrelationCalculators, string>>(calculatorList);
-      var partitionList = FCE.EnumToList<FCE.Partitions>().Select(x => new KeyValuePair<FCE.Partitions, string>(x, FCE.GetEnumDescription(x))).ToList();
+      CorrelationCalcComboBox.DataSource = new BindingList<KeyValuePair<FeatureCorrelationEnums.CorrelationCalculators, string>>(calculatorList);
+      var partitionList = FeatureCorrelationEnums.EnumToList<FeatureCorrelationEnums.Partitions>().Select(x => new KeyValuePair<FeatureCorrelationEnums.Partitions, string>(x, FeatureCorrelationEnums.GetEnumDescription(x))).ToList();
       PartitionComboBox.ValueMember = "Key";
       PartitionComboBox.DisplayMember = "Value";
-      PartitionComboBox.DataSource = new BindingList<KeyValuePair<FCE.Partitions, string>>(partitionList);
+      PartitionComboBox.DataSource = new BindingList<KeyValuePair<FeatureCorrelationEnums.Partitions, string>>(partitionList);
     }
 
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      fcc.ProgressCalculation += new DataAnalysis.FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
-      fcc.CorrelationCalculationFinished += new DataAnalysis.FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
+      fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
+      fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
     }
 
     protected override void DeregisterContentEvents() {
-      fcc.CorrelationCalculationFinished += new DataAnalysis.FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
-      fcc.ProgressCalculation += new DataAnalysis.FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
+      fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
+      fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
       base.DeregisterContentEvents();
     }
@@ -115,4 +114,5 @@
 
     protected abstract void CalculateCorrelation();
+    protected abstract void Content_CorrelationCalculationFinished(object sender, FeatureCorrelationCalculator.CorrelationCalculationFinishedArgs e);
 
     protected void UpdateDataGrid() {
@@ -163,6 +163,4 @@
       HeatMapProgressBar.Value = e.ProgressPercentage;
     }
-
-    protected abstract void Content_CorrelationCalculationFinished(object sender, FeatureCorrelationCalculator.CorrelationCalculationFinishedArgs e);
 
     protected void DataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCache.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCache.cs	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCache.cs	(revision 8729)
@@ -24,10 +24,9 @@
 using System.Collections.Generic;
 using HeuristicLab.PluginInfrastructure;
-using FCE = HeuristicLab.Problems.DataAnalysis.FeatureCorrelationEnums;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
   [NonDiscoverableType]
   internal class FeatureCorrelationCache : Object {
-    private Dictionary<FCE.CorrelationCalculators, Dictionary<FCE.Partitions, double[,]>> correlationsCache;
+    private Dictionary<FeatureCorrelationEnums.CorrelationCalculators, Dictionary<FeatureCorrelationEnums.Partitions, double[,]>> correlationsCache;
 
     public FeatureCorrelationCache()
@@ -37,7 +36,7 @@
 
     private void InitializeCaches() {
-      correlationsCache = new Dictionary<FCE.CorrelationCalculators, Dictionary<FCE.Partitions, double[,]>>();
-      foreach (var calc in FCE.EnumToList<FCE.CorrelationCalculators>()) {
-        correlationsCache.Add(calc, new Dictionary<FCE.Partitions, double[,]>());
+      correlationsCache = new Dictionary<FeatureCorrelationEnums.CorrelationCalculators, Dictionary<FeatureCorrelationEnums.Partitions, double[,]>>();
+      foreach (var calc in FeatureCorrelationEnums.EnumToList<FeatureCorrelationEnums.CorrelationCalculators>()) {
+        correlationsCache.Add(calc, new Dictionary<FeatureCorrelationEnums.Partitions, double[,]>());
       }
     }
@@ -47,5 +46,5 @@
     }
 
-    public double[,] GetCorrelation(FCE.CorrelationCalculators calc, FCE.Partitions partition) {
+    public double[,] GetCorrelation(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition) {
       double[,] corr;
       correlationsCache[calc].TryGetValue(partition, out corr);
@@ -53,5 +52,5 @@
     }
 
-    public void SetCorrelation(FCE.CorrelationCalculators calc, FCE.Partitions partition, double[,] correlation) {
+    public void SetCorrelation(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition, double[,] correlation) {
       correlationsCache[calc][partition] = correlation;
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs	(revision 8729)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs	(revision 8729)
@@ -0,0 +1,272 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [NonDiscoverableType]
+  public class FeatureCorrelationCalculator : Object {
+
+    private BackgroundWorker bw;
+    private BackgroundWorkerInfo bwInfo;
+
+    private IDataAnalysisProblemData problemData;
+    public IDataAnalysisProblemData ProblemData {
+      set {
+        if (bw != null) {
+          bw.CancelAsync();
+        }
+        problemData = value;
+      }
+    }
+
+    public FeatureCorrelationCalculator()
+      : base() { }
+
+    public FeatureCorrelationCalculator(IDataAnalysisProblemData problemData)
+      : base() {
+      this.problemData = problemData;
+    }
+
+    public void CalculateElements(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition) {
+      CalculateElements(problemData.Dataset, calc, partition);
+    }
+
+    // returns if any calculation takes place
+    public bool CalculateTimeframeElements(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition, string variable, int frames, double[,] correlation = null) {
+      if (correlation == null || correlation.GetLength(1) <= frames) {
+        CalculateElements(problemData.Dataset, calc, partition, variable, frames, correlation);
+        return true;
+      } else {
+        return false;
+      }
+    }
+
+    private double[,] GetElementsOfCorrelation(double[,] corr, int frames) {
+      double[,] elements = new double[corr.GetLength(0), frames + 1];
+      for (int i = 0; i < corr.GetLength(0); i++) {
+        for (int j = 0; j <= frames; j++) {
+          elements[i, j] = corr[i, j];
+        }
+      }
+      return elements;
+    }
+
+    private void CalculateElements(Dataset dataset, FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition, string variable = null, int frames = 0, double[,] alreadyCalculated = null) {
+      bwInfo = new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated };
+      if (bw == null) {
+        bw = new BackgroundWorker();
+        bw.WorkerReportsProgress = true;
+        bw.WorkerSupportsCancellation = true;
+        bw.DoWork += new DoWorkEventHandler(BwDoWork);
+        bw.ProgressChanged += new ProgressChangedEventHandler(BwProgressChanged);
+        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BwRunWorkerCompleted);
+      }
+      if (bw.IsBusy) {
+        bw.CancelAsync();
+      } else {
+        bw.RunWorkerAsync(bwInfo);
+      }
+    }
+
+    #region backgroundworker
+    private void BwDoWork(object sender, DoWorkEventArgs e) {
+      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
+      if (bwInfo.Variable == null) {
+        BwCalculateCorrelation(sender, e);
+      } else {
+        BwCalculateTimeframeCorrelation(sender, e);
+      }
+    }
+
+    private void BwCalculateCorrelation(object sender, DoWorkEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+
+      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
+      Dataset dataset = bwInfo.Dataset;
+      FeatureCorrelationEnums.Partitions partition = bwInfo.Partition;
+      FeatureCorrelationEnums.CorrelationCalculators calc = bwInfo.Calculator;
+
+      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
+      OnlineCalculatorError error = OnlineCalculatorError.None;
+      int length = doubleVariableNames.Count;
+      double[,] elements = new double[length, length];
+      double calculations = (Math.Pow(length, 2) + length) / 2;
+
+      worker.ReportProgress(0);
+
+      for (int i = 0; i < length; i++) {
+        for (int j = 0; j < i + 1; j++) {
+          if (worker.CancellationPending) {
+            e.Cancel = true;
+            return;
+          }
+          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
+          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
+
+          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
+
+          if (!error.Equals(OnlineCalculatorError.None)) {
+            elements[i, j] = double.NaN;
+          }
+          elements[j, i] = elements[i, j];
+          worker.ReportProgress((int)Math.Round((((Math.Pow(i, 2) + i) / 2 + j + 1.0) / calculations) * 100));
+        }
+      }
+      e.Result = elements;
+    }
+
+    private void BwCalculateTimeframeCorrelation(object sender, DoWorkEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+
+      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
+      Dataset dataset = bwInfo.Dataset;
+      FeatureCorrelationEnums.Partitions partition = bwInfo.Partition;
+      FeatureCorrelationEnums.CorrelationCalculators calc = bwInfo.Calculator;
+      string variable = bwInfo.Variable;
+      int frames = bwInfo.Frames;
+      double[,] alreadyCalculated = bwInfo.AlreadyCalculated;
+
+      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
+      OnlineCalculatorError error = OnlineCalculatorError.None;
+      int length = doubleVariableNames.Count;
+      double[,] elements = new double[length, frames + 1];
+      double calculations = (frames + 1) * length;
+
+      worker.ReportProgress(0);
+
+      int start = 0;
+      if (alreadyCalculated != null) {
+        for (int i = 0; i < alreadyCalculated.GetLength(0); i++) {
+          Array.Copy(alreadyCalculated, i * alreadyCalculated.GetLength(1), elements, i * elements.GetLength(1), alreadyCalculated.GetLength(1));
+        }
+        start = alreadyCalculated.GetLength(1);
+      }
+
+      for (int i = 0; i < length; i++) {
+        for (int j = start; j <= frames; j++) {
+          if (worker.CancellationPending) {
+            e.Cancel = true;
+            return;
+          }
+
+          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, variable);
+          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
+
+          var valuesInFrame = var1.Take(j);
+          var help = var1.Skip(j).ToList();
+          help.AddRange(valuesInFrame);
+          var1 = help;
+
+          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
+
+          if (!error.Equals(OnlineCalculatorError.None)) {
+            elements[i, j] = double.NaN;
+          }
+          worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
+        }
+      }
+      e.Result = elements;
+    }
+
+    private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, FeatureCorrelationEnums.Partitions partition, string variable) {
+      IEnumerable<double> var = problemData.Dataset.GetDoubleValues(variable);
+      if (partition.Equals(FeatureCorrelationEnums.Partitions.TrainingSamples)) {
+        var = var.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
+      } else if (partition.Equals(FeatureCorrelationEnums.Partitions.TestSamples)) {
+        var = var.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
+      }
+      return var;
+    }
+
+    private double CalculateElementWithCalculator(FeatureCorrelationEnums.CorrelationCalculators calc, IEnumerable<double> var1, IEnumerable<double> var2, out OnlineCalculatorError error) {
+      if (calc.Equals(FeatureCorrelationEnums.CorrelationCalculators.HoeffdingsDependence)) {
+        return HoeffdingsDependenceCalculator.Calculate(var1, var2, out error);
+      } else if (calc.Equals(FeatureCorrelationEnums.CorrelationCalculators.SpearmansRank)) {
+        return SpearmansRankCorrelationCoefficientCalculator.Calculate(var1, var2, out error);
+      } else if (calc.Equals(FeatureCorrelationEnums.CorrelationCalculators.PearsonsRSquared)) {
+        return OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error);
+      } else {
+        return Math.Sqrt(OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error));
+      }
+    }
+
+    private void BwRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+      if (!e.Cancelled && !worker.CancellationPending) {
+        if (!(e.Error == null)) {
+          ErrorHandling.ShowErrorDialog(e.Error);
+        } else {
+          OnCorrelationCalculationFinished((double[,])e.Result, bwInfo.Calculator, bwInfo.Partition, bwInfo.Variable);
+        }
+      } else {
+        bw.RunWorkerAsync(bwInfo);
+      }
+    }
+    #endregion
+
+    #region events
+    public class CorrelationCalculationFinishedArgs : EventArgs {
+      public double[,] Correlation { get; private set; }
+      public FeatureCorrelationEnums.CorrelationCalculators Calculcator { get; private set; }
+      public FeatureCorrelationEnums.Partitions Partition { get; private set; }
+      public string Variable { get; private set; }
+
+      public CorrelationCalculationFinishedArgs(double[,] correlation, FeatureCorrelationEnums.CorrelationCalculators calculator, FeatureCorrelationEnums.Partitions partition, string variable = null) {
+        this.Correlation = correlation;
+        this.Calculcator = calculator;
+        this.Partition = partition;
+        this.Variable = variable;
+      }
+    }
+
+    public delegate void CorrelationCalculationFinishedHandler(object sender, CorrelationCalculationFinishedArgs e);
+    public event CorrelationCalculationFinishedHandler CorrelationCalculationFinished;
+    protected virtual void OnCorrelationCalculationFinished(double[,] correlation, FeatureCorrelationEnums.CorrelationCalculators calculator, FeatureCorrelationEnums.Partitions partition, string variable = null) {
+      var handler = CorrelationCalculationFinished;
+      if (handler != null)
+        handler(this, new CorrelationCalculationFinishedArgs(correlation, calculator, partition, variable));
+    }
+
+    public delegate void ProgressCalculationHandler(object sender, ProgressChangedEventArgs e);
+    public event ProgressCalculationHandler ProgressCalculation;
+    protected void BwProgressChanged(object sender, ProgressChangedEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+      if (!worker.CancellationPending && ProgressCalculation != null) {
+        ProgressCalculation(sender, e);
+      }
+    }
+    #endregion
+
+    private class BackgroundWorkerInfo {
+      public Dataset Dataset { get; set; }
+      public FeatureCorrelationEnums.CorrelationCalculators Calculator { get; set; }
+      public FeatureCorrelationEnums.Partitions Partition { get; set; }
+      public string Variable { get; set; }
+      public int Frames { get; set; }
+      public double[,] AlreadyCalculated { get; set; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationEnums.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationEnums.cs	(revision 8729)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationEnums.cs	(revision 8729)
@@ -0,0 +1,103 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+using HeuristicLab.Data;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  // see http://blog.spontaneouspublicity.com/associating-strings-with-enums-in-c
+  [NonDiscoverableType]
+  public class FeatureCorrelationEnums {
+    public enum Partitions {
+      [Description("All Samples")]
+      AllSamples,
+      [Description("Training Samples")]
+      TrainingSamples,
+      [Description("Test Samples")]
+      TestSamples
+    }
+
+    public enum CorrelationCalculators {
+      [Description("Pearsons R")]
+      PearsonsR,
+      [Description("Pearsons R Squared")]
+      PearsonsRSquared,
+      [Description("Hoeffdings Dependence")]
+      HoeffdingsDependence,
+      [Description("Spearmans Rank")]
+      SpearmansRank
+    }
+
+    public static readonly Dictionary<CorrelationCalculators, DoubleRange> calculatorInterval = new Dictionary<CorrelationCalculators, DoubleRange>(){ 
+      { CorrelationCalculators.PearsonsR, new DoubleRange(1.0, -1.0)},
+      { CorrelationCalculators.SpearmansRank, new DoubleRange(1.0, -1.0)},
+      { CorrelationCalculators.HoeffdingsDependence, new DoubleRange(1.0, -0.5)},
+      { CorrelationCalculators.PearsonsRSquared, new DoubleRange(1.0, 0.0)}
+    };
+
+    public static string GetEnumDescription(object value) {
+      FieldInfo fi = value.GetType().GetField(value.ToString());
+
+      DescriptionAttribute[] attributes =
+          (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
+
+      if (attributes != null && attributes.Length > 0)
+        return attributes[0].Description;
+      else
+        return value.ToString();
+    }
+
+    public static IEnumerable<T> EnumToList<T>() {
+      Type enumType = typeof(T);
+
+      // Can't use generic type constraints on value types,
+      // so have to do check like this
+      if (enumType.BaseType != typeof(Enum)) {
+        throw new ArgumentException("T must be of type System.Enum");
+      }
+
+      Array enumValArray = Enum.GetValues(enumType);
+      return Enum.GetValues(enumType).Cast<int>().Select(x => (T)Enum.Parse(enumType, x.ToString())).ToList();
+    }
+
+    public static T GetEnumOfDescription<T>(string desc) {
+      Type enumType = typeof(T);
+
+      if (enumType.BaseType != typeof(Enum))
+        throw new ArgumentException("T must be of type System.Enum");
+
+      Array enumValArray = Enum.GetValues(enumType);
+      foreach (int val in enumValArray) {
+
+        T e = (T)Enum.Parse(enumType, val.ToString());
+        if (GetEnumDescription(e).Equals(desc)) {
+          return (T)e;
+        }
+      }
+      throw new ArgumentException("Description is not in the given type T");
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationTimeframeCache.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationTimeframeCache.cs	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationTimeframeCache.cs	(revision 8729)
@@ -24,10 +24,9 @@
 using System.Collections.Generic;
 using HeuristicLab.PluginInfrastructure;
-using FCE = HeuristicLab.Problems.DataAnalysis.FeatureCorrelationEnums;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
   [NonDiscoverableType]
   internal class FeatureCorrelationTimeframeCache : Object {
-    private Dictionary<FCE.CorrelationCalculators, Dictionary<FCE.Partitions, Dictionary<string, double[,]>>> timeFrameCorrelationsCache;
+    private Dictionary<FeatureCorrelationEnums.CorrelationCalculators, Dictionary<FeatureCorrelationEnums.Partitions, Dictionary<string, double[,]>>> timeFrameCorrelationsCache;
 
     public FeatureCorrelationTimeframeCache()
@@ -37,8 +36,8 @@
 
     private void InitializeCaches() {
-      timeFrameCorrelationsCache = new Dictionary<FCE.CorrelationCalculators, Dictionary<FCE.Partitions, Dictionary<string, double[,]>>>();
-      foreach (var calc in FCE.EnumToList<FCE.CorrelationCalculators>()) {
-        timeFrameCorrelationsCache.Add(calc, new Dictionary<FCE.Partitions, Dictionary<string, double[,]>>());
-        foreach (var part in FCE.EnumToList<FCE.Partitions>()) {
+      timeFrameCorrelationsCache = new Dictionary<FeatureCorrelationEnums.CorrelationCalculators, Dictionary<FeatureCorrelationEnums.Partitions, Dictionary<string, double[,]>>>();
+      foreach (var calc in FeatureCorrelationEnums.EnumToList<FeatureCorrelationEnums.CorrelationCalculators>()) {
+        timeFrameCorrelationsCache.Add(calc, new Dictionary<FeatureCorrelationEnums.Partitions, Dictionary<string, double[,]>>());
+        foreach (var part in FeatureCorrelationEnums.EnumToList<FeatureCorrelationEnums.Partitions>()) {
           timeFrameCorrelationsCache[calc].Add(part, new Dictionary<string, double[,]>());
         }
@@ -50,5 +49,5 @@
     }
 
-    public double[,] GetTimeframeCorrelation(FCE.CorrelationCalculators calc, FCE.Partitions partition, string variable) {
+    public double[,] GetTimeframeCorrelation(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition, string variable) {
       double[,] corr;
       timeFrameCorrelationsCache[calc][partition].TryGetValue(variable, out corr);
@@ -56,5 +55,5 @@
     }
 
-    public void SetTimeframeCorrelation(FCE.CorrelationCalculators calc, FCE.Partitions partition, string variable, double[,] correlation) {
+    public void SetTimeframeCorrelation(FeatureCorrelationEnums.CorrelationCalculators calc, FeatureCorrelationEnums.Partitions partition, string variable, double[,] correlation) {
       timeFrameCorrelationsCache[calc][partition][variable] = correlation;
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs	(revision 8729)
@@ -25,5 +25,4 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using FCE = HeuristicLab.Problems.DataAnalysis.FeatureCorrelationEnums;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -47,6 +46,6 @@
     protected override void CalculateCorrelation() {
       if (CorrelationCalcComboBox.SelectedItem != null && PartitionComboBox.SelectedItem != null) {
-        FCE.CorrelationCalculators calc = (FCE.CorrelationCalculators)CorrelationCalcComboBox.SelectedValue;
-        FCE.Partitions partition = (FCE.Partitions)PartitionComboBox.SelectedValue;
+        FeatureCorrelationEnums.CorrelationCalculators calc = (FeatureCorrelationEnums.CorrelationCalculators)CorrelationCalcComboBox.SelectedValue;
+        FeatureCorrelationEnums.Partitions partition = (FeatureCorrelationEnums.Partitions)PartitionComboBox.SelectedValue;
         DataGridView.Columns.Clear();
         DataGridView.Enabled = false;
@@ -61,6 +60,6 @@
     }
 
-    private void SetNewCorrelation(double[,] elements, FCE.CorrelationCalculators calc) {
-      DoubleRange range = FCE.calculatorInterval[calc];
+    private void SetNewCorrelation(double[,] elements, FeatureCorrelationEnums.CorrelationCalculators calc) {
+      DoubleRange range = FeatureCorrelationEnums.calculatorInterval[calc];
       HeatMap hm = new HeatMap(elements, "", range.End, range.Start);
       hm.RowNames = Content.Dataset.DoubleVariables;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs	(revision 8729)
@@ -26,5 +26,4 @@
 using HeuristicLab.Data;
 using HeuristicLab.MainForm;
-using FCE = HeuristicLab.Problems.DataAnalysis.FeatureCorrelationEnums;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -59,6 +58,6 @@
       string variable = (string)VariableSelectionComboBox.SelectedItem;
       if (CorrelationCalcComboBox.SelectedItem != null && PartitionComboBox.SelectedItem != null && variable != null) {
-        FCE.CorrelationCalculators calc = (FCE.CorrelationCalculators)CorrelationCalcComboBox.SelectedValue;
-        FCE.Partitions partition = (FCE.Partitions)PartitionComboBox.SelectedValue;
+        FeatureCorrelationEnums.CorrelationCalculators calc = (FeatureCorrelationEnums.CorrelationCalculators)CorrelationCalcComboBox.SelectedValue;
+        FeatureCorrelationEnums.Partitions partition = (FeatureCorrelationEnums.Partitions)PartitionComboBox.SelectedValue;
         DataGridView.Columns.Clear();
         DataGridView.Enabled = false;
@@ -76,5 +75,5 @@
     }
 
-    private void SetNewCorrelation(double[,] elements, FCE.CorrelationCalculators calc, int frames) {
+    private void SetNewCorrelation(double[,] elements, FeatureCorrelationEnums.CorrelationCalculators calc, int frames) {
       double[,] neededValues = new double[elements.GetLength(0), frames + 1];
       for (int i = 0; i < elements.GetLength(0); i++) {
@@ -84,6 +83,6 @@
     }
 
-    private void SetNewCorrelation(double[,] elements, FCE.CorrelationCalculators calc) {
-      DoubleRange range = FCE.calculatorInterval[calc];
+    private void SetNewCorrelation(double[,] elements, FeatureCorrelationEnums.CorrelationCalculators calc) {
+      DoubleRange range = FeatureCorrelationEnums.calculatorInterval[calc];
       HeatMap hm = new HeatMap(elements, "", range.End, range.Start);
       hm.RowNames = Content.Dataset.DoubleVariables;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8729)
@@ -162,4 +162,6 @@
       <DependentUpon>DataAnalysisSolutionEvaluationView.cs</DependentUpon>
     </Compile>
+    <Compile Include="FeatureCorrelation\FeatureCorrelationCalculator.cs" />
+    <Compile Include="FeatureCorrelation\FeatureCorrelationEnums.cs" />
     <Compile Include="FeatureCorrelation\VariableVisibilityDialog.cs">
       <SubType>Form</SubType>
@@ -452,5 +454,4 @@
     </BootstrapperPackage>
   </ItemGroup>
-  <ItemGroup />
   <ItemGroup>
     <EmbeddedResource Include="FeatureCorrelation\AbstractFeatureCorrelationView.resx">
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 8728)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 8729)
@@ -130,6 +130,4 @@
     <Compile Include="Implementation\Clustering\ClusteringProblemData.cs" />
     <Compile Include="Implementation\Clustering\ClusteringSolution.cs" />
-    <Compile Include="Implementation\FeatureCorrelation\FeatureCorrelationCalculator.cs" />
-    <Compile Include="Implementation\FeatureCorrelation\FeatureCorrelationEnums.cs" />
     <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" />
     <Compile Include="Implementation\Regression\ConstantRegressionSolution.cs" />
@@ -272,4 +270,5 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
