Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics.sln
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics.sln	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics.sln	(revision 9353)
@@ -0,0 +1,33 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C80F4C35-CB87-4695-8A53-6F2D08275253}"
+	ProjectSection(SolutionItems) = preProject
+		PreBuildEvent.cmd = PreBuildEvent.cmd
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Analysis.Statistics-3.3", "HeuristicLab.Analysis.Statistics\3.3\HeuristicLab.Analysis.Statistics-3.3.csproj", "{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Release|x64.ActiveCfg = Release|Any CPU
+		{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}.Release|x86.ActiveCfg = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.cs	(revision 9353)
@@ -0,0 +1,307 @@
+﻿#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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis.Statistics {
+  [View("RunCollection Chart Analysis View")]
+  [Content(typeof(RunCollection), false)]
+  public sealed partial class RunCollectionStatisticalTabularView : ItemView {
+    public RunCollectionStatisticalTabularView() {
+      InitializeComponent();
+      stringConvertibleMatrixView.DataGridView.RowHeaderMouseDoubleClick += new DataGridViewCellMouseEventHandler(DataGridView_RowHeaderMouseDoubleClick);
+    }
+
+    void DataGridView_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {
+      if (e.RowIndex >= 0) {
+        IRun run = Content.ElementAt(e.RowIndex);
+        IContentView view = MainFormManager.MainForm.ShowContent(run);
+        if (view != null) {
+          view.ReadOnly = this.ReadOnly;
+          view.Locked = this.Locked;
+        }
+      }
+    }
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        stringConvertibleMatrixView.DataGridView.RowHeaderMouseDoubleClick -= new DataGridViewCellMouseEventHandler(DataGridView_RowHeaderMouseDoubleClick);
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public override bool ReadOnly {
+      get { return true; }
+      set { /*not needed because results are always readonly */}
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      dataTableComboBox.Items.Clear();
+      dataRowComboBox.Items.Clear();
+
+      if (Content != null) {
+        UpdateDataTableComboBox();
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      RegisterRunEvents(Content);
+    }
+
+    private void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      DeregisterRunEvents(Content);
+    }
+
+    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+      RebuildCombinedDataTable();
+    }
+
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+      RebuildCombinedDataTable();
+    }
+
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+      RebuildCombinedDataTable();
+    }
+
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else {
+        if (!Content.UpdateOfRunsInProgress) {
+          IRun run = (IRun)sender;
+          UpdateRun(run);
+        }
+      }
+    }
+    #endregion
+
+    private void UpdateRun(IRun run) {
+      //TODO: hacky di hack... this is baaaadddd
+      RebuildCombinedDataTable();
+    }
+
+    private void dataTableComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      UpdateDataRowComboBox();
+    }
+
+    private void dataRowComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      RebuildCombinedDataTable();
+    }
+
+    private void UpdateDataRowComboBox() {
+      dataRowComboBox.Items.Clear();
+      var resultName = (string)dataTableComboBox.SelectedItem;
+      var dataTables = from run in Content
+                       where run.Results.ContainsKey(resultName)
+                       select run.Results[resultName] as DataTable;
+      var rowNames = (from dataTable in dataTables
+                      from row in dataTable.Rows
+                      select row.Name).Distinct().ToArray();
+
+      dataRowComboBox.Items.AddRange(rowNames);
+      if (dataRowComboBox.Items.Count > 0) dataRowComboBox.SelectedItem = dataRowComboBox.Items[0];
+    }
+
+    private void UpdateDataTableComboBox() {
+      dataTableComboBox.Items.Clear();
+      var dataTables = (from run in Content
+                        from result in run.Results
+                        where result.Value is DataTable
+                        select result.Key).Distinct().ToArray();
+
+      dataTableComboBox.Items.AddRange(dataTables);
+      if (dataTableComboBox.Items.Count > 0) dataTableComboBox.SelectedItem = dataTableComboBox.Items[0];
+    }
+
+    private void RebuildCombinedDataTable() {
+      string resultName = (string)dataTableComboBox.SelectedItem;
+      string rowName = (string)dataRowComboBox.SelectedItem;
+
+      string[] columnNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile", "Gradient", "Relative Error", "Avg. of Upper 25 %", " Avg. of Lower 25 %", "Avg. of First 25 %", "Avg. of Last 25 %" };
+
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+
+      StringMatrix dt = new StringMatrix(runs.Count(), columnNames.Count());
+      dt.RowNames = runs.Select(x => x.Name);
+      dt.ColumnNames = columnNames;
+
+      int i = 0;
+      foreach (Run run in runs) {
+        DataTable resTable = (DataTable)run.Results[resultName];
+        DataRow row = resTable.Rows[rowName];
+        var values = row.Values.AsEnumerable();
+
+        double cnt = values.Count();
+        double min = values.Min();
+        double max = values.Max();
+        double avg = values.Average();
+        double median = values.Median();
+        double stdDev = values.StandardDeviation();
+        double variance = values.Variance();
+        double percentile25 = values.Percentile(0.25);
+        double percentile75 = values.Percentile(0.75);
+        double k, d, r;
+        LinearLeastSquaresFitting.Calculate(values.ToArray(), out k, out d);
+        r = LinearLeastSquaresFitting.CalculateError(values.ToArray(), k, d);
+        double lowerAvg = values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average();
+        double upperAvg = values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average();
+        double firstAvg = values.Take((int)(values.Count() * 0.25)).Average();
+        double lastAvg = values.Skip((int)(values.Count() * 0.75)).Average();
+
+        dt[i, 0] = cnt.ToString();
+        dt[i, 1] = min.ToString();
+        dt[i, 2] = max.ToString();
+        dt[i, 3] = avg.ToString();
+        dt[i, 4] = median.ToString();
+        dt[i, 5] = stdDev.ToString();
+        dt[i, 6] = variance.ToString();
+        dt[i, 7] = percentile25.ToString();
+        dt[i, 8] = percentile75.ToString();
+        dt[i, 9] = k.ToString();
+        dt[i, 10] = r.ToString();
+        dt[i, 11] = upperAvg.ToString();
+        dt[i, 12] = lowerAvg.ToString();
+        dt[i, 13] = firstAvg.ToString();
+        dt[i, 14] = lastAvg.ToString();
+
+        i++;
+      }
+
+      stringConvertibleMatrixView.Content = dt;
+    }
+
+    private void addLineToChart_Click(object sender, EventArgs e) {
+      string resultName = (string)dataTableComboBox.SelectedItem;
+      string rowName = (string)dataRowComboBox.SelectedItem;
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+
+      foreach (Run run in runs) {
+        DataTable resTable = (DataTable)run.Results[resultName];
+        DataRow row = resTable.Rows[rowName];
+        var values = row.Values.ToArray();
+        double k, d;
+        LinearLeastSquaresFitting.Calculate(values, out k, out d);
+
+        DataRow newRow = new DataRow(row.Name + " Fitted Line");
+        for (int i = 0; i < values.Count(); i++) {
+          newRow.Values.Add(k * i + d);
+        }
+
+        if (!resTable.Rows.ContainsKey(newRow.Name))
+          resTable.Rows.Add(newRow);
+      }
+    }
+
+    private void addValuesButton_Click(object sender, EventArgs e) {
+      string resultName = (string)dataTableComboBox.SelectedItem;
+      string rowName = (string)dataRowComboBox.SelectedItem;
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+      StringMatrix sm = (StringMatrix)stringConvertibleMatrixView.Content;
+
+      Content.UpdateOfRunsInProgress = true;
+      for (int i = 0; i < runs.Count(); i++) {
+        IRun run = runs.ElementAt(i);
+
+        for (int j = 0; j < sm.ColumnNames.Count(); j++) {
+          string newResultName = resultName + " " + rowName + " " + sm.ColumnNames.ElementAt(j);
+          if (!run.Results.ContainsKey(newResultName))
+            run.Results.Add(new KeyValuePair<string, Core.IItem>(newResultName, new DoubleValue(double.Parse(sm[i, j]))));
+        }
+      }
+      Content.UpdateOfRunsInProgress = false;
+      //update column names of run collection
+      Content.Modify();
+    }
+
+    private void colorButton_Click(object sender, EventArgs e) {
+      string resultName = (string)dataTableComboBox.SelectedItem;
+      string rowName = (string)dataRowComboBox.SelectedItem;
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+      Dictionary<int, double> values = new Dictionary<int, double>();
+
+      if (stringConvertibleMatrixView.DataGridView.CurrentCell != null) {
+        int curIndex = stringConvertibleMatrixView.DataGridView.CurrentCell.ColumnIndex;
+
+        for (int i = 0; i < stringConvertibleMatrixView.Content.Rows; i++) {
+          values[i] = double.Parse(stringConvertibleMatrixView.Content.GetValue(i, curIndex));
+        }
+
+        var orderedValues = values.OrderBy(x => x.Value);
+
+        for (int i = 0; i < orderedValues.Count(); i++) {
+          var row = stringConvertibleMatrixView.DataGridView.Rows[orderedValues.ElementAt(i).Key];
+
+          int r = (int)Math.Round((double)i / (double)orderedValues.Count() * 255.0);
+          int g = (int)Math.Round(((double)orderedValues.Count() - (double)i) / (double)orderedValues.Count() * 255.0);
+
+          Color color = Color.FromArgb(r, g, 0);
+          row.DefaultCellStyle.ForeColor = color;
+        }
+      }
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.designer.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.designer.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ChartAnalysisView.designer.cs	(revision 9353)
@@ -0,0 +1,163 @@
+﻿#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
+
+namespace HeuristicLab.Analysis.Statistics {
+  partial class RunCollectionStatisticalTabularView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.dataRowComboBox = new System.Windows.Forms.ComboBox();
+      this.label2 = new System.Windows.Forms.Label();
+      this.label1 = new System.Windows.Forms.Label();
+      this.dataTableComboBox = new System.Windows.Forms.ComboBox();
+      this.addLineToChart = new System.Windows.Forms.Button();
+      this.addValuesButton = new System.Windows.Forms.Button();
+      this.colorButton = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // stringConvertibleMatrixView
+      // 
+      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
+      this.stringConvertibleMatrixView.Content = null;
+      this.stringConvertibleMatrixView.Location = new System.Drawing.Point(3, 59);
+      this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
+      this.stringConvertibleMatrixView.ReadOnly = false;
+      this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = true;
+      this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
+      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(492, 294);
+      this.stringConvertibleMatrixView.TabIndex = 0;
+      // 
+      // dataRowComboBox
+      // 
+      this.dataRowComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.dataRowComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.dataRowComboBox.FormattingEnabled = true;
+      this.dataRowComboBox.Location = new System.Drawing.Point(71, 33);
+      this.dataRowComboBox.Name = "dataRowComboBox";
+      this.dataRowComboBox.Size = new System.Drawing.Size(424, 21);
+      this.dataRowComboBox.TabIndex = 8;
+      this.dataRowComboBox.SelectedIndexChanged += new System.EventHandler(this.dataRowComboBox_SelectedIndexChanged);
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(5, 36);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(55, 13);
+      this.label2.TabIndex = 7;
+      this.label2.Text = "DataRow:";
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(5, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(60, 13);
+      this.label1.TabIndex = 6;
+      this.label1.Text = "DataTable:";
+      // 
+      // dataTableComboBox
+      // 
+      this.dataTableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.dataTableComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.dataTableComboBox.FormattingEnabled = true;
+      this.dataTableComboBox.Location = new System.Drawing.Point(71, 3);
+      this.dataTableComboBox.Name = "dataTableComboBox";
+      this.dataTableComboBox.Size = new System.Drawing.Size(424, 21);
+      this.dataTableComboBox.TabIndex = 5;
+      this.dataTableComboBox.SelectedIndexChanged += new System.EventHandler(this.dataTableComboBox_SelectedIndexChanged);
+      // 
+      // addLineToChart
+      // 
+      this.addLineToChart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.addLineToChart.Location = new System.Drawing.Point(420, 359);
+      this.addLineToChart.Name = "addLineToChart";
+      this.addLineToChart.Size = new System.Drawing.Size(75, 23);
+      this.addLineToChart.TabIndex = 9;
+      this.addLineToChart.Text = "Fit Line";
+      this.addLineToChart.UseVisualStyleBackColor = true;
+      this.addLineToChart.Click += new System.EventHandler(this.addLineToChart_Click);
+      // 
+      // addValuesButton
+      // 
+      this.addValuesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.addValuesButton.Location = new System.Drawing.Point(281, 359);
+      this.addValuesButton.Name = "addValuesButton";
+      this.addValuesButton.Size = new System.Drawing.Size(133, 23);
+      this.addValuesButton.TabIndex = 10;
+      this.addValuesButton.Text = "Add Values to Results";
+      this.addValuesButton.UseVisualStyleBackColor = true;
+      this.addValuesButton.Click += new System.EventHandler(this.addValuesButton_Click);
+      // 
+      // colorButton
+      // 
+      this.colorButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.colorButton.Location = new System.Drawing.Point(200, 359);
+      this.colorButton.Name = "colorButton";
+      this.colorButton.Size = new System.Drawing.Size(75, 23);
+      this.colorButton.TabIndex = 11;
+      this.colorButton.Text = "Color Rows";
+      this.colorButton.UseVisualStyleBackColor = true;
+      this.colorButton.Click += new System.EventHandler(this.colorButton_Click);
+      // 
+      // RunCollectionStatisticalTabularView
+      // 
+      this.Controls.Add(this.colorButton);
+      this.Controls.Add(this.addValuesButton);
+      this.Controls.Add(this.addLineToChart);
+      this.Controls.Add(this.dataRowComboBox);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.dataTableComboBox);
+      this.Controls.Add(this.stringConvertibleMatrixView);
+      this.Name = "RunCollectionStatisticalTabularView";
+      this.Size = new System.Drawing.Size(498, 385);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+    #endregion
+
+    private HeuristicLab.Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView;
+    private System.Windows.Forms.ComboBox dataRowComboBox;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox dataTableComboBox;
+    private System.Windows.Forms.Button addLineToChart;
+    private System.Windows.Forms.Button addValuesButton;
+    private System.Windows.Forms.Button colorButton;
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj	(revision 9353)
@@ -0,0 +1,164 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{2533D1F9-F7F6-46CB-90D2-76D254E38DEE}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Analysis.Statistics</RootNamespace>
+    <AssemblyName>HeuristicLab.Analysis.Statistics-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ALGLIB-3.6.0, Version=3.6.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="LinearLeastSquaresFitting.cs" />
+    <Compile Include="SampleSizeChecker.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SampleSizeChecker.designer.cs">
+      <DependentUpon>SampleSizeChecker.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SampleSizeDetermination.cs" />
+    <Compile Include="StatisticalTestingView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="StatisticalTestingView.designer.cs">
+      <DependentUpon>StatisticalTestingView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="KruskalWallis.cs" />
+    <Compile Include="ResultCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ResultCorrelationView.designer.cs">
+      <DependentUpon>ResultCorrelationView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ChartAnalysisView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ChartAnalysisView.designer.cs">
+      <DependentUpon>ChartAnalysisView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="TTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="StatisticalTestingView.resx">
+      <DependentUpon>StatisticalTestingView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/KruskalWallis.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/KruskalWallis.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/KruskalWallis.cs	(revision 9353)
@@ -0,0 +1,150 @@
+﻿#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;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class KruskalWallis {
+    /// <summary>
+    /// Performs the Kruskal-Wallis test and returns the p-Value. 
+    /// (source based on R's kruskal.test())
+    /// </summary>
+    public static double Test(double[][] data) {
+      double[] g;
+      double[] x = FlattenArray(data, out g);
+      int n = x.Length;
+      int parameter = data.Length - 1;
+
+      int[] r = Rank(x);
+      double[][] ties = CountDuplicates(x);
+      double statistic = CalculateStatistic(r, g);
+      double tiesCorrection = CalculateTiesCorrection(ties);
+      statistic = ((12 * statistic / (n * (n + 1)) - 3 * (n + 1)) /
+                  (1 - tiesCorrection / (Math.Pow(n, 3) - n)));
+
+      return alglib.chisquarecdistribution(parameter, statistic);
+    }
+
+    private static double CalculateStatistic(int[] r, double[] g) {
+      double result = 0.0;
+      double lastG = g[0];
+      double curSum = 0.0;
+      int cnt = 0;
+      for (int i = 0; i < r.Length; i++) {
+        if (lastG == g[i]) {
+          curSum += r[i];
+          cnt++;
+        } else {
+          double sum = Math.Pow(curSum, 2);
+          sum /= cnt;
+          result += sum;
+
+          lastG = g[i];
+          curSum = r[i];
+          cnt = 1;
+        }
+      }
+
+      double lastSum = Math.Pow(curSum, 2);
+      lastSum /= cnt;
+      result += lastSum;
+
+      return result;
+    }
+
+    private static double CalculateTiesCorrection(double[][] ties) {
+      double sum = 0.0;
+      for (int i = 0; i < ties[1].Length; i++) {
+        double tic = Math.Pow(ties[1][i], 3) - ties[1][i];
+        sum += tic;
+      }
+      return sum;
+    }
+
+    private static double[] FlattenArray(double[][] x, out double[] indizes) {
+      int compLenght = 0;
+      for (int i = 0; i < x.Length; i++) {
+        compLenght += x[i].Length;
+      }
+
+      double[] result = new double[compLenght];
+      indizes = new double[compLenght];
+
+      int resultPos = 0;
+      for (int i = 0; i < x.Length; i++) {
+        Array.Copy(x[i], 0, result, resultPos, x[i].Length);
+
+        for (int j = resultPos; j < resultPos + x[i].Length; j++) {
+          indizes[j] = i;
+        }
+        resultPos += x[i].Length;
+      }
+
+      return result;
+    }
+
+    private static double[][] CountDuplicates(double[] x) {
+      List<double> number = new List<double>();
+      List<double> cnt = new List<double>();
+      double[] sortedX = new double[x.Length];
+
+      Array.Copy(x, sortedX, x.Length);
+      Array.Sort(sortedX);
+
+      double last = x[0];
+      number.Add(x[0]);
+      cnt.Add(1);
+
+      for (int i = 1; i < x.Length; i++) {
+        if (last != x[i]) {
+          number.Add(x[i]);
+          last = x[i];
+          cnt.Add(1);
+        } else {
+          cnt[cnt.Count - 1] += 1;
+        }
+      }
+
+      double[][] result = new double[2][];
+      result[0] = number.ToArray();
+      result[1] = cnt.ToArray();
+
+      return result;
+    }
+
+    private static int[] Rank(double[] x) {
+      double[] keys = new double[x.Length];
+      int[] items = new int[x.Length];
+      int[] ranks = new int[x.Length];
+
+      Array.Copy(x, keys, x.Length);
+      for (int i = 0; i < x.Length; i++) items[i] = i;
+
+      Array.Sort(keys, items);
+
+      for (int i = 0; i < x.Length; i++) {
+        ranks[items[i]] = i + 1;
+      }
+      return ranks;
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/LinearLeastSquaresFitting.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/LinearLeastSquaresFitting.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/LinearLeastSquaresFitting.cs	(revision 9353)
@@ -0,0 +1,61 @@
+﻿#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.Linq;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class LinearLeastSquaresFitting {
+    public static void Calculate(double[] dataPoints, out double a1, out double a0) {
+      double sxy = 0.0;
+      double sxx = 0.0;
+      int n = dataPoints.Count();
+      double sy = dataPoints.Sum();
+      double sx = ((n - 1) * n) / 2;
+      double avgy = sy / n;
+      double avgx = sx / n;
+
+      for (int i = 0; i < n; i++) {
+        sxy += i * dataPoints[i];
+        sxx += i * i;
+      }
+
+      a1 = (sxy - (n * avgx * avgy)) / (sxx - (n * avgx * avgx));
+      a0 = avgy - a1 * avgx;
+    }
+
+    public static double CalculateError(double[] dataPoints, double a1, double a0) {
+      double r = 0.0;
+      double avgy = dataPoints.Average();
+      double sstot = 0.0;
+      double sserr = 0.0;
+
+      for (int i = 0; i < dataPoints.Count(); i++) {
+        double y = a1 * i + a0;
+        sstot += Math.Pow(dataPoints[i] - avgy, 2);
+        sserr += Math.Pow(dataPoints[i] - y, 2);
+      }
+
+      r = 1.0 - (sserr / sstot);
+      return r;
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Plugin.cs.frame
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Plugin.cs.frame	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Plugin.cs.frame	(revision 9353)
@@ -0,0 +1,41 @@
+#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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Analysis.Statistics {
+  [Plugin("HeuristicLab.Analysis.Statistics", "Provides statistical tools for analyzing runs.", "3.3.7.$WCREV$")]
+  [PluginFile("HeuristicLab.Analysis.Statistics-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimizer", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]  
+  public class HeuristicLabAnalysisStatisticsPlugin : PluginBase {
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Properties/AssemblyInfo.cs.frame	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/Properties/AssemblyInfo.cs.frame	(revision 9353)
@@ -0,0 +1,56 @@
+﻿#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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views")]
+[assembly: AssemblyDescription("Provides analyzers for tracking the behavior of GAs.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("410e1c1e-c991-49cd-843d-35a741927e4d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs	(revision 9353)
@@ -0,0 +1,185 @@
+﻿#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.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis.Statistics {
+  [View("Result Correlation View")]
+  [Content(typeof(RunCollection), false)]
+  public sealed partial class ResultCorrelationView : ItemView {
+    public ResultCorrelationView() {
+      InitializeComponent();
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public override bool ReadOnly {
+      get { return true; }
+      set { /*not needed because results are always readonly */}
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      resultComboBox.Items.Clear();
+
+      if (Content != null) {
+        UpdateResultComboBox();
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      RegisterRunEvents(Content);
+    }
+
+    private void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      DeregisterRunEvents(Content);
+    }
+
+    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else {
+        IRun run = (IRun)sender;
+        UpdateRun(run);
+      }
+    }
+    #endregion
+
+    private void UpdateRun(IRun run) {
+      //TODO: hacky di hack... this is baaaadddd
+      RebuildCorrelationTable();
+    }
+
+    private void UpdateResultComboBox() {
+      resultComboBox.Items.Clear();
+      var results = (from run in Content
+                     from result in run.Results
+                     select result.Key).Distinct().ToArray();
+
+      resultComboBox.Items.AddRange(results);
+      if (resultComboBox.Items.Count > 0) resultComboBox.SelectedItem = resultComboBox.Items[0];
+    }
+
+
+    private List<string> GetRowNames() {
+      string resultName = (string)resultComboBox.SelectedItem;
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+      List<string> ret = new List<string>();
+
+      foreach (var r in runs) {
+        var ress = r.Results.Where(y => y.Value is DoubleValue).Select(z => z.Key);
+        foreach (var s in ress) {
+          if (!ret.Contains(s))
+            ret.Add(s);
+        }
+      }
+
+      return ret;
+    }
+
+    private void RebuildCorrelationTable() {
+      string resultName = (string)resultComboBox.SelectedItem;
+
+      var columnNames = new string[2];
+      columnNames[0] = "Pearson product-moment correlation coefficient";
+      columnNames[1] = "Spearman's rank correlation coefficient";
+      var rowNames = GetRowNames();
+
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+
+      StringMatrix dt = new StringMatrix(rowNames.Count(), columnNames.Count());
+      dt.RowNames = rowNames;
+      dt.ColumnNames = columnNames;
+
+      int j = 0;
+      foreach (var rowName in rowNames) {
+        var resultRowVals = runs.Where(x => x.Results.ContainsKey(rowName)).Where(x => x.Results[rowName] is DoubleValue).Select(x => ((DoubleValue)x.Results[rowName]).Value);
+        var resultVals = runs.Where(x => x.Results.ContainsKey(resultName)).Where(x => x.Results[resultName] is DoubleValue).Select(x => ((DoubleValue)x.Results[resultName]).Value);
+
+        if (resultVals.Contains(double.NaN)
+          || resultRowVals.Contains(double.NaN)
+          || resultVals.Contains(double.NegativeInfinity)
+          || resultVals.Contains(double.PositiveInfinity)
+          || resultRowVals.Contains(double.NegativeInfinity)
+          || resultRowVals.Contains(double.PositiveInfinity)) {
+          dt[j, 0] = "X";
+          dt[j++, 1] = "X";
+        } else {
+          dt[j, 0] = alglib.pearsoncorr2(resultVals.ToArray(), resultRowVals.ToArray()).ToString();
+          dt[j++, 1] = alglib.spearmancorr2(resultVals.ToArray(), resultRowVals.ToArray()).ToString();
+        }
+      }
+
+      stringConvertibleMatrixView.Content = dt;
+    }
+
+    private void calculateCorrelation_Click(object sender, EventArgs e) {
+      RebuildCorrelationTable();
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs	(revision 9353)
@@ -0,0 +1,118 @@
+﻿#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
+
+namespace HeuristicLab.Analysis.Statistics {
+  partial class ResultCorrelationView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.label1 = new System.Windows.Forms.Label();
+      this.resultComboBox = new System.Windows.Forms.ComboBox();
+      this.calculateCorrelation = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // stringConvertibleMatrixView
+      // 
+      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
+      this.stringConvertibleMatrixView.Content = null;
+      this.stringConvertibleMatrixView.Location = new System.Drawing.Point(3, 30);
+      this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
+      this.stringConvertibleMatrixView.ReadOnly = false;
+      this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = true;
+      this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
+      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(492, 323);
+      this.stringConvertibleMatrixView.TabIndex = 0;
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(5, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(40, 13);
+      this.label1.TabIndex = 6;
+      this.label1.Text = "Result:";
+      // 
+      // resultComboBox
+      // 
+      this.resultComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.resultComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.resultComboBox.FormattingEnabled = true;
+      this.resultComboBox.Location = new System.Drawing.Point(71, 3);
+      this.resultComboBox.Name = "resultComboBox";
+      this.resultComboBox.Size = new System.Drawing.Size(424, 21);
+      this.resultComboBox.TabIndex = 5;
+      // 
+      // calculateCorrelation
+      // 
+      this.calculateCorrelation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.calculateCorrelation.Location = new System.Drawing.Point(310, 359);
+      this.calculateCorrelation.Name = "calculateCorrelation";
+      this.calculateCorrelation.Size = new System.Drawing.Size(185, 23);
+      this.calculateCorrelation.TabIndex = 9;
+      this.calculateCorrelation.Text = "Calculate correlation coefficient";
+      this.calculateCorrelation.UseVisualStyleBackColor = true;
+      this.calculateCorrelation.Click += new System.EventHandler(this.calculateCorrelation_Click);
+      // 
+      // ResultCorrelationView
+      // 
+      this.Controls.Add(this.calculateCorrelation);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.resultComboBox);
+      this.Controls.Add(this.stringConvertibleMatrixView);
+      this.Name = "ResultCorrelationView";
+      this.Size = new System.Drawing.Size(498, 385);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+    #endregion
+
+    private HeuristicLab.Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox resultComboBox;
+    private System.Windows.Forms.Button calculateCorrelation;
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.cs	(revision 9353)
@@ -0,0 +1,177 @@
+﻿#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.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis.Statistics {
+  [View("Sample Size Checker View")]
+  [Content(typeof(RunCollection), false)]
+  public sealed partial class SampleSizeChecker : ItemView {
+
+    private double[] data;
+
+    public SampleSizeChecker() {
+      InitializeComponent();
+
+      double prec = 0.01;
+      double conf = 0.95;
+      precisionTextBox.Text = prec.ToString();
+      confIntervalTextBox.Text = conf.ToString();
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public override bool ReadOnly {
+      get { return true; }
+      set { /*not needed because results are always readonly */}
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      resultComboBox.Items.Clear();
+
+      if (Content != null) {
+        UpdateResultComboBox();
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      RegisterRunEvents(Content);
+    }
+
+    private void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+
+      DeregisterRunEvents(Content);
+    }
+
+    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+      //RebuildInfluenceDataTable();
+    }
+
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else {
+        IRun run = (IRun)sender;
+        UpdateRun(run);
+      }
+    }
+    #endregion
+
+    private void UpdateRun(IRun run) {
+      //TODO: hacky di hack... this is baaaadddd
+      RebuildDataTable();
+    }
+
+    private void UpdateResultComboBox() {
+      resultComboBox.Items.Clear();
+      var results = (from run in Content
+                     where run.Visible
+                     from result in run.Results
+                     where result.Value is IntValue || result.Value is DoubleValue
+                     select result.Key).Distinct().ToArray();
+
+      resultComboBox.Items.AddRange(results);
+      if (resultComboBox.Items.Count > 0) resultComboBox.SelectedItem = resultComboBox.Items[0];
+    }
+
+    private void RebuildDataTable() {
+      string resultName = (string)resultComboBox.SelectedItem;
+
+      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+      var vals = runs.Select(x => (double)((dynamic)x.Results[resultName]).Value);
+      data = vals.ToArray();
+
+      DoubleMatrix dt = new DoubleMatrix(runs.Count(), 1);
+      dt.ColumnNames = new string[] { resultName };
+
+      int i = 0;
+      foreach (double val in vals) {
+        dt[i++, 0] = val;
+      }
+
+      stringConvertibleMatrixView.Content = dt;
+    }
+
+    private void estimateSampleSizeButton_Click(object sender, EventArgs e) {
+      double precision = double.Parse(precisionTextBox.Text);
+      double confInterval = double.Parse(confIntervalTextBox.Text);
+
+      int nrSamplesReq = SampleSizeDetermination.DetermineSampleSizeByEstimatingMean(data, precision, confInterval);
+      int curNrSamples = data.Count();
+      int diff = curNrSamples - nrSamplesReq;
+
+      IntMatrix m = new IntMatrix(1, 3);
+      m[0, 0] = curNrSamples;
+      m[0, 1] = nrSamplesReq;
+      m[0, 2] = diff;
+      m.ColumnNames = new string[] { "Nr. of current samples", "Minimum nr. of required samples", "Difference" };
+
+      MainFormManager.MainForm.ShowContent(m);
+    }
+
+    private void resultComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      RebuildDataTable();
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.designer.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.designer.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeChecker.designer.cs	(revision 9353)
@@ -0,0 +1,167 @@
+﻿#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
+
+namespace HeuristicLab.Analysis.Statistics {
+  partial class SampleSizeChecker {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.label1 = new System.Windows.Forms.Label();
+      this.resultComboBox = new System.Windows.Forms.ComboBox();
+      this.estimateSampleSizeButton = new System.Windows.Forms.Button();
+      this.precisionTextBox = new System.Windows.Forms.TextBox();
+      this.confIntervalTextBox = new System.Windows.Forms.TextBox();
+      this.label2 = new System.Windows.Forms.Label();
+      this.label3 = new System.Windows.Forms.Label();
+      this.SuspendLayout();
+      // 
+      // stringConvertibleMatrixView
+      // 
+      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
+      this.stringConvertibleMatrixView.Content = null;
+      this.stringConvertibleMatrixView.Location = new System.Drawing.Point(3, 30);
+      this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
+      this.stringConvertibleMatrixView.ReadOnly = false;
+      this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = false;
+      this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
+      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(746, 329);
+      this.stringConvertibleMatrixView.TabIndex = 0;
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(5, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(40, 13);
+      this.label1.TabIndex = 6;
+      this.label1.Text = "Result:";
+      // 
+      // resultComboBox
+      // 
+      this.resultComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.resultComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.resultComboBox.FormattingEnabled = true;
+      this.resultComboBox.Location = new System.Drawing.Point(71, 3);
+      this.resultComboBox.Name = "resultComboBox";
+      this.resultComboBox.Size = new System.Drawing.Size(678, 21);
+      this.resultComboBox.TabIndex = 5;
+      this.resultComboBox.SelectedValueChanged += new System.EventHandler(this.resultComboBox_SelectedValueChanged);
+      // 
+      // estimateSampleSizeButton
+      // 
+      this.estimateSampleSizeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.estimateSampleSizeButton.Location = new System.Drawing.Point(630, 365);
+      this.estimateSampleSizeButton.Name = "estimateSampleSizeButton";
+      this.estimateSampleSizeButton.Size = new System.Drawing.Size(119, 23);
+      this.estimateSampleSizeButton.TabIndex = 9;
+      this.estimateSampleSizeButton.Text = "Estimate sample size";
+      this.estimateSampleSizeButton.UseVisualStyleBackColor = true;
+      this.estimateSampleSizeButton.Click += new System.EventHandler(this.estimateSampleSizeButton_Click);
+      // 
+      // precisionTextBox
+      // 
+      this.precisionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.precisionTextBox.Location = new System.Drawing.Point(64, 367);
+      this.precisionTextBox.Name = "precisionTextBox";
+      this.precisionTextBox.Size = new System.Drawing.Size(106, 20);
+      this.precisionTextBox.TabIndex = 10;
+      // 
+      // confIntervalTextBox
+      // 
+      this.confIntervalTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.confIntervalTextBox.Location = new System.Drawing.Point(331, 368);
+      this.confIntervalTextBox.Name = "confIntervalTextBox";
+      this.confIntervalTextBox.Size = new System.Drawing.Size(100, 20);
+      this.confIntervalTextBox.TabIndex = 11;
+      // 
+      // label2
+      // 
+      this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(5, 370);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(53, 13);
+      this.label2.TabIndex = 12;
+      this.label2.Text = "Precision:";
+      // 
+      // label3
+      // 
+      this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.label3.AutoSize = true;
+      this.label3.Location = new System.Drawing.Point(223, 370);
+      this.label3.Name = "label3";
+      this.label3.Size = new System.Drawing.Size(102, 13);
+      this.label3.TabIndex = 13;
+      this.label3.Text = "Confidence Interval:";
+      // 
+      // SampleSizeChecker
+      // 
+      this.Controls.Add(this.label3);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.confIntervalTextBox);
+      this.Controls.Add(this.precisionTextBox);
+      this.Controls.Add(this.estimateSampleSizeButton);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.resultComboBox);
+      this.Controls.Add(this.stringConvertibleMatrixView);
+      this.Name = "SampleSizeChecker";
+      this.Size = new System.Drawing.Size(752, 391);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+    #endregion
+
+    private HeuristicLab.Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox resultComboBox;
+    private System.Windows.Forms.Button estimateSampleSizeButton;
+    private System.Windows.Forms.TextBox precisionTextBox;
+    private System.Windows.Forms.TextBox confIntervalTextBox;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.Label label3;
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeDetermination.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeDetermination.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeDetermination.cs	(revision 9353)
@@ -0,0 +1,92 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class SampleSizeDetermination {
+    /// <summary>
+    /// Determines for a given sample the sample size by estimating the means. 
+    /// </summary>
+    /// <param name="samples">The pilot sample.</param>
+    /// <param name="e">Precision. </param>
+    /// <param name="conf">Confidence Interval.</param>
+    /// <returns>Number of required samples for the given confidence interval and precision. </returns>
+    public static int DetermineSampleSizeByEstimatingMean(double[] samples, double e, double conf = 0.95) {
+      if (e < 0) throw new ArgumentException("e needs to be a positive number.");
+      if (conf < 0 || conf > 1) throw new ArgumentException("The confidence Interval must be between zero and one.");
+      double result = 0;
+
+      double var = samples.StandardDeviation();
+      double n = alglib.invnormaldistribution((conf + 1) / 2);
+      result = Math.Pow(n, 2) * Math.Pow(var, 2) / Math.Pow(e, 2);
+      result = Math.Ceiling(result);
+      if (result > int.MaxValue)
+        return int.MaxValue;
+      else
+        return (int)result;
+    }
+
+    /// <summary>
+    /// Calculates Cohen's d.
+    /// </summary>
+    /// <returns>Cohen's d. 
+    /// d = 0.2 means small effect
+    /// d = 0.5 means medium effect
+    /// d = 0.8 means big effect
+    /// According to Wikipedia this means: "A lower Cohen's d indicates a necessity of larger sample sizes, and vice versa."
+    /// </returns>
+    public static double CalculateCohensD(double[] d1, double[] d2) {
+      double x1, x2, s1, s2;
+
+      x1 = d1.Average();
+      x2 = d2.Average();
+      s1 = d1.Variance();
+      s2 = d2.Variance();
+
+      return (x1 - x2) / Math.Sqrt((s1 + s2) / 2);
+    }
+
+    /// <summary>
+    /// Calculates Hedges' g. 
+    /// Hedges' g works like Cohen's d but corrects for bias. 
+    /// </summary>
+    /// <returns>Hedges' g</returns>
+    public static double CalculateHedgesG(double[] d1, double[] d2) {
+      double x1, x2, s1, s2, n1, n2, s, g, c;
+
+      x1 = d1.Average();
+      x2 = d2.Average();
+      s1 = d1.Variance();
+      s2 = d2.Variance();
+      n1 = d1.Count();
+      n2 = d2.Count();
+
+      s = Math.Sqrt(((n1 - 1) * s1 + (n2 - 1) * s2) / (n1 + n2 - 2));
+      g = (x1 - x2) / s;
+      c = (1 - (3 / (4 * (n1 + n2) - 9))) * g;
+
+      return c;
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 9353)
@@ -0,0 +1,270 @@
+﻿#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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Views;
+
+namespace HeuristicLab.Analysis.Statistics {
+  [View("Statistical Testing View")]
+  [Content(typeof(RunCollection), false)]
+  public sealed partial class StatisticalTestingView : ItemView {
+    private double[][] data;
+
+    public StatisticalTestingView() {
+      InitializeComponent();
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public override bool ReadOnly {
+      get { return true; }
+      set { /*not needed because results are always readonly */}
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+
+      if (Content != null) {
+        UpdateResultComboBox();
+        UpdateGroupsComboBox();
+        RebuildDataTable();
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+    }
+    #endregion
+
+    private void UpdateGroupsComboBox() {
+      groupComboBox.Items.Clear();
+
+      var parameters = (from run in Content
+                        where run.Visible
+                        from param in run.Parameters
+                        select param.Key).Distinct().ToArray();
+
+      foreach (var p in parameters) {
+        var variations = (from run in Content
+                          where run.Visible && run.Parameters.ContainsKey(p) &&
+                          (run.Parameters[p] is IntValue || run.Parameters[p] is DoubleValue ||
+                          run.Parameters[p] is StringValue || run.Parameters[p] is BoolValue)
+                          select ((dynamic)run.Parameters[p]).Value).Distinct();
+
+        if (variations.Count() > 1) {
+          groupComboBox.Items.Add(p);
+        }
+      }
+
+      if (groupComboBox.Items.Count > 0) {
+        //try to select something different than "Seed" or "Algorithm Name" as this makes no sense
+        //and takes a long time to group
+        List<int> possibleIndizes = new List<int>();
+        for (int i = 0; i < groupComboBox.Items.Count; i++) {
+          if (groupComboBox.Items[i].ToString() != "Seed"
+            && groupComboBox.Items[i].ToString() != "Algorithm Name") {
+            possibleIndizes.Add(i);
+          }
+        }
+
+        if (possibleIndizes.Count > 0) {
+          groupComboBox.SelectedItem = groupComboBox.Items[possibleIndizes.First()];
+        } else {
+          groupComboBox.SelectedItem = groupComboBox.Items[0];
+        }
+      }
+    }
+
+    private string[] GetColumnNames(IEnumerable<IRun> runs) {
+      string parameterName = (string)groupComboBox.SelectedItem;
+      var r = runs.Where(x => x.Parameters.ContainsKey(parameterName));
+      return r.Select(x => ((dynamic)x.Parameters[parameterName]).Value).Distinct().Select(x => (string)x.ToString()).ToArray();
+    }
+
+    private void UpdateResultComboBox() {
+      resultComboBox.Items.Clear();
+      var results = (from run in Content
+                     where run.Visible
+                     from result in run.Results
+                     where result.Value is IntValue || result.Value is DoubleValue
+                     select result.Key).Distinct().ToArray();
+
+      resultComboBox.Items.AddRange(results);
+      if (resultComboBox.Items.Count > 0) resultComboBox.SelectedItem = resultComboBox.Items[0];
+    }
+
+    private void RebuildDataTable() {
+      string parameterName = (string)groupComboBox.SelectedItem;
+      if (parameterName != null) {
+        string resultName = (string)resultComboBox.SelectedItem;
+
+        var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
+        var columnNames = GetColumnNames(runs);
+        var groups = GetGroups(columnNames, runs);
+        data = new double[columnNames.Count()][];
+
+        DoubleMatrix dt = new DoubleMatrix(groups.Select(x => x.Count()).Max(), columnNames.Count());
+        dt.ColumnNames = columnNames;
+
+        int i = 0;
+        int j = 0;
+        foreach (string columnName in columnNames) {
+          j = 0;
+          data[i] = new double[groups[i].Count()];
+          foreach (IRun run in groups[i]) {
+            dt[j, i] = (double)((dynamic)run.Results[resultName]).Value;
+            data[i][j] = dt[j, i];
+            j++;
+          }
+          i++;
+        }
+
+        stringConvertibleMatrixView.Content = dt;
+      }
+    }
+
+    private List<IEnumerable<IRun>> GetGroups(string[] columnNames, IEnumerable<IRun> runs) {
+      List<IEnumerable<IRun>> runCols = new List<IEnumerable<IRun>>();
+      string parameterName = (string)groupComboBox.SelectedItem;
+
+      foreach (string cn in columnNames) {
+        var tmpRuns = runs.Where(x => ((string)((dynamic)x.Parameters[parameterName]).Value.ToString()) == cn);
+        runCols.Add(tmpRuns);
+      }
+
+      return runCols;
+    }
+
+    private void testButton_Click(object sender, EventArgs e) {
+      double pval = KruskalWallis.Test(data);
+      pValTextBox.Text = pval.ToString();
+    }
+
+    private void normalDistButton_Click(object sender, EventArgs e) {
+      double val;
+      List<double> res = new List<double>();
+
+      for (int i = 0; i < data.Length; i++) {
+        alglib.jarqueberatest(data[i], data[i].Length, out val);
+        res.Add(val);
+      }
+
+      for (int i = 0; i < res.Count(); i++) {
+        if (res[i] < 0.1) {
+          stringConvertibleMatrixView.DataGridView.Columns[i].DefaultCellStyle.ForeColor = Color.Red;
+        } else {
+          stringConvertibleMatrixView.DataGridView.Columns[i].DefaultCellStyle.ForeColor = Color.Green;
+        }
+      }
+    }
+
+    private void resultComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      RebuildDataTable();
+      pValTextBox.Text = string.Empty;
+    }
+
+    private void groupComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      RebuildDataTable();
+      pValTextBox.Text = string.Empty;
+    }
+
+    private void normalityDetails_Click(object sender, EventArgs e) {
+      DoubleMatrix pValsMatrix = new DoubleMatrix(1, stringConvertibleMatrixView.Content.Columns);
+      pValsMatrix.ColumnNames = stringConvertibleMatrixView.Content.ColumnNames;
+      pValsMatrix.RowNames = new string[] { "p-Value" };
+
+      double val;
+      for (int i = 0; i < data.Length; i++) {
+        alglib.jarqueberatest(data[i], data[i].Length, out val);
+        pValsMatrix[0, i] = val;
+      }
+
+      MainFormManager.MainForm.ShowContent(pValsMatrix);
+    }
+
+    private void pairwiseTestButton_Click(object sender, EventArgs e) {
+      var selectedCells = stringConvertibleMatrixView.DataGridView.SelectedCells;
+      if (selectedCells.Count < 1) {
+        MessageBox.Show("Please selected one cell/column for pairwise comparision. ", "HeuristicLab", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        return;
+      }
+
+      int colIndex = selectedCells[0].ColumnIndex;
+      foreach (DataGridViewCell selC in selectedCells) {
+        if (colIndex != selC.ColumnIndex) {
+          MessageBox.Show("Please selected only one column for pairwise comparision. ", "HeuristicLab", MessageBoxButtons.OK, MessageBoxIcon.Error);
+          return;
+        }
+      }
+
+      DoubleMatrix pValsMatrix = new DoubleMatrix(5, stringConvertibleMatrixView.Content.Columns);
+      pValsMatrix.ColumnNames = stringConvertibleMatrixView.Content.ColumnNames;
+      pValsMatrix.RowNames = new string[] { "p-Value of MannWhitneyU", "p-Value of T-Test", "Necessary Sample Size for T-Test", "Cohen's d", "Hedges' g" };
+
+      double mwuBothtails;
+      double mwuLefttail;
+      double mwuRighttail;
+      double ttestLefttail;
+      for (int i = 0; i < data.Length; i++) {
+        alglib.mannwhitneyutest(data[colIndex], data[colIndex].Length, data[i], data[i].Length, out mwuBothtails, out mwuLefttail, out mwuRighttail);
+        ttestLefttail = TTest.Test(data[colIndex], data[i]);
+        pValsMatrix[0, i] = mwuBothtails;
+        pValsMatrix[1, i] = ttestLefttail;
+        pValsMatrix[2, i] = TTest.GetOptimalSampleSize(data[colIndex], data[i]);
+        pValsMatrix[3, i] = SampleSizeDetermination.CalculateCohensD(data[colIndex], data[i]);
+        pValsMatrix[4, i] = SampleSizeDetermination.CalculateHedgesG(data[colIndex], data[i]);
+      }
+
+      MainFormManager.MainForm.ShowContent(pValsMatrix);
+    }
+
+    private void infoLabel_DoubleClick(object sender, EventArgs e) {
+      using (TextDialog dialog = new TextDialog("Description of statistical tests", toolTip1.GetToolTip(this.infoLabel), true)) {
+        dialog.ShowDialog(this);
+      }
+    }
+
+    private void openBoxPlotToolStripMenuItem_Click(object sender, EventArgs e) {
+      RunCollectionBoxPlotView boxplotView = new RunCollectionBoxPlotView();
+      boxplotView.Content = Content;
+      // TODO: enable as soon as we move to HeuristicLab.Optimization.Views
+      // boxplotView.xAxisComboBox.SelectedItem = xAxisComboBox.SelectedItem;
+      // boxplotView.yAxisComboBox.SelectedItem = yAxisComboBox.SelectedItem;
+      boxplotView.Show();
+    }
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 9353)
@@ -0,0 +1,307 @@
+﻿#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
+
+namespace HeuristicLab.Analysis.Statistics {
+  partial class StatisticalTestingView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StatisticalTestingView));
+      this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.openBoxPlotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.groupByLabel = new System.Windows.Forms.Label();
+      this.label1 = new System.Windows.Forms.Label();
+      this.resultComboBox = new System.Windows.Forms.ComboBox();
+      this.testButton = new System.Windows.Forms.Button();
+      this.normalDistButton = new System.Windows.Forms.Button();
+      this.lblPVal = new System.Windows.Forms.Label();
+      this.pValTextBox = new System.Windows.Forms.TextBox();
+      this.groupComboBox = new System.Windows.Forms.ComboBox();
+      this.normalityDetails = new System.Windows.Forms.Button();
+      this.pairwiseTestButton = new System.Windows.Forms.Button();
+      this.infoLabel = new System.Windows.Forms.Label();
+      this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+      this.contextMenuStrip1.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+      this.splitContainer1.Panel1.SuspendLayout();
+      this.splitContainer1.Panel2.SuspendLayout();
+      this.splitContainer1.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+      this.splitContainer2.Panel1.SuspendLayout();
+      this.splitContainer2.Panel2.SuspendLayout();
+      this.splitContainer2.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // stringConvertibleMatrixView
+      // 
+      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
+      this.stringConvertibleMatrixView.Content = null;
+      this.stringConvertibleMatrixView.ContextMenuStrip = this.contextMenuStrip1;
+      this.stringConvertibleMatrixView.Location = new System.Drawing.Point(3, 38);
+      this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
+      this.stringConvertibleMatrixView.ReadOnly = false;
+      this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = false;
+      this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
+      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(918, 423);
+      this.stringConvertibleMatrixView.TabIndex = 0;
+      // 
+      // contextMenuStrip1
+      // 
+      this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.openBoxPlotToolStripMenuItem});
+      this.contextMenuStrip1.Name = "contextMenuStrip1";
+      this.contextMenuStrip1.Size = new System.Drawing.Size(175, 26);
+      // 
+      // openBoxPlotToolStripMenuItem
+      // 
+      this.openBoxPlotToolStripMenuItem.Name = "openBoxPlotToolStripMenuItem";
+      this.openBoxPlotToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
+      this.openBoxPlotToolStripMenuItem.Text = "Open BoxPlot View";
+      this.openBoxPlotToolStripMenuItem.Click += new System.EventHandler(this.openBoxPlotToolStripMenuItem_Click);
+      // 
+      // groupByLabel
+      // 
+      this.groupByLabel.AutoSize = true;
+      this.groupByLabel.Location = new System.Drawing.Point(3, 6);
+      this.groupByLabel.Name = "groupByLabel";
+      this.groupByLabel.Size = new System.Drawing.Size(53, 13);
+      this.groupByLabel.TabIndex = 7;
+      this.groupByLabel.Text = "Group by:";
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 6);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(40, 13);
+      this.label1.TabIndex = 6;
+      this.label1.Text = "Result:";
+      // 
+      // resultComboBox
+      // 
+      this.resultComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.resultComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.resultComboBox.FormattingEnabled = true;
+      this.resultComboBox.Location = new System.Drawing.Point(49, 3);
+      this.resultComboBox.Name = "resultComboBox";
+      this.resultComboBox.Size = new System.Drawing.Size(393, 21);
+      this.resultComboBox.TabIndex = 5;
+      this.resultComboBox.SelectedValueChanged += new System.EventHandler(this.resultComboBox_SelectedValueChanged);
+      // 
+      // testButton
+      // 
+      this.testButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.testButton.Location = new System.Drawing.Point(196, 3);
+      this.testButton.Name = "testButton";
+      this.testButton.Size = new System.Drawing.Size(109, 23);
+      this.testButton.TabIndex = 9;
+      this.testButton.Text = "Test all Groups";
+      this.testButton.UseVisualStyleBackColor = true;
+      this.testButton.Click += new System.EventHandler(this.testButton_Click);
+      // 
+      // normalDistButton
+      // 
+      this.normalDistButton.Location = new System.Drawing.Point(3, 3);
+      this.normalDistButton.Name = "normalDistButton";
+      this.normalDistButton.Size = new System.Drawing.Size(166, 23);
+      this.normalDistButton.TabIndex = 11;
+      this.normalDistButton.Text = "Check for Normal Distribution";
+      this.normalDistButton.UseVisualStyleBackColor = true;
+      this.normalDistButton.Click += new System.EventHandler(this.normalDistButton_Click);
+      // 
+      // lblPVal
+      // 
+      this.lblPVal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.lblPVal.AutoSize = true;
+      this.lblPVal.Location = new System.Drawing.Point(311, 8);
+      this.lblPVal.Name = "lblPVal";
+      this.lblPVal.Size = new System.Drawing.Size(46, 13);
+      this.lblPVal.TabIndex = 12;
+      this.lblPVal.Text = "p-Value:";
+      this.lblPVal.TextAlign = System.Drawing.ContentAlignment.TopRight;
+      // 
+      // pValTextBox
+      // 
+      this.pValTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.pValTextBox.Location = new System.Drawing.Point(363, 5);
+      this.pValTextBox.Name = "pValTextBox";
+      this.pValTextBox.ReadOnly = true;
+      this.pValTextBox.Size = new System.Drawing.Size(144, 20);
+      this.pValTextBox.TabIndex = 13;
+      // 
+      // groupComboBox
+      // 
+      this.groupComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.groupComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.groupComboBox.FormattingEnabled = true;
+      this.groupComboBox.Location = new System.Drawing.Point(62, 3);
+      this.groupComboBox.Name = "groupComboBox";
+      this.groupComboBox.Size = new System.Drawing.Size(377, 21);
+      this.groupComboBox.TabIndex = 14;
+      this.groupComboBox.SelectedValueChanged += new System.EventHandler(this.groupComboBox_SelectedValueChanged);
+      // 
+      // normalityDetails
+      // 
+      this.normalityDetails.Location = new System.Drawing.Point(175, 3);
+      this.normalityDetails.Name = "normalityDetails";
+      this.normalityDetails.Size = new System.Drawing.Size(181, 23);
+      this.normalityDetails.TabIndex = 15;
+      this.normalityDetails.Text = "Show Details of Normality Test";
+      this.normalityDetails.UseVisualStyleBackColor = true;
+      this.normalityDetails.Click += new System.EventHandler(this.normalityDetails_Click);
+      // 
+      // pairwiseTestButton
+      // 
+      this.pairwiseTestButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.pairwiseTestButton.Location = new System.Drawing.Point(58, 3);
+      this.pairwiseTestButton.Name = "pairwiseTestButton";
+      this.pairwiseTestButton.Size = new System.Drawing.Size(132, 23);
+      this.pairwiseTestButton.TabIndex = 16;
+      this.pairwiseTestButton.Text = "Pairwise Statistical Test";
+      this.pairwiseTestButton.UseVisualStyleBackColor = true;
+      this.pairwiseTestButton.Click += new System.EventHandler(this.pairwiseTestButton_Click);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.infoLabel.Image = ((System.Drawing.Image)(resources.GetObject("infoLabel.Image")));
+      this.infoLabel.Location = new System.Drawing.Point(905, 9);
+      this.infoLabel.Name = "infoLabel";
+      this.infoLabel.Size = new System.Drawing.Size(16, 16);
+      this.infoLabel.TabIndex = 17;
+      this.toolTip1.SetToolTip(this.infoLabel, resources.GetString("infoLabel.ToolTip"));
+      this.infoLabel.DoubleClick += new System.EventHandler(this.infoLabel_DoubleClick);
+      // 
+      // splitContainer1
+      // 
+      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.splitContainer1.Location = new System.Drawing.Point(8, 3);
+      this.splitContainer1.Name = "splitContainer1";
+      // 
+      // splitContainer1.Panel1
+      // 
+      this.splitContainer1.Panel1.Controls.Add(this.resultComboBox);
+      this.splitContainer1.Panel1.Controls.Add(this.label1);
+      // 
+      // splitContainer1.Panel2
+      // 
+      this.splitContainer1.Panel2.Controls.Add(this.groupByLabel);
+      this.splitContainer1.Panel2.Controls.Add(this.groupComboBox);
+      this.splitContainer1.Size = new System.Drawing.Size(891, 29);
+      this.splitContainer1.SplitterDistance = 445;
+      this.splitContainer1.TabIndex = 18;
+      // 
+      // splitContainer2
+      // 
+      this.splitContainer2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.splitContainer2.Location = new System.Drawing.Point(8, 467);
+      this.splitContainer2.Name = "splitContainer2";
+      // 
+      // splitContainer2.Panel1
+      // 
+      this.splitContainer2.Panel1.Controls.Add(this.normalDistButton);
+      this.splitContainer2.Panel1.Controls.Add(this.normalityDetails);
+      // 
+      // splitContainer2.Panel2
+      // 
+      this.splitContainer2.Panel2.Controls.Add(this.pairwiseTestButton);
+      this.splitContainer2.Panel2.Controls.Add(this.testButton);
+      this.splitContainer2.Panel2.Controls.Add(this.pValTextBox);
+      this.splitContainer2.Panel2.Controls.Add(this.lblPVal);
+      this.splitContainer2.Size = new System.Drawing.Size(913, 30);
+      this.splitContainer2.SplitterDistance = 399;
+      this.splitContainer2.TabIndex = 19;
+      // 
+      // StatisticalTestingView
+      // 
+      this.Controls.Add(this.splitContainer2);
+      this.Controls.Add(this.splitContainer1);
+      this.Controls.Add(this.infoLabel);
+      this.Controls.Add(this.stringConvertibleMatrixView);
+      this.Name = "StatisticalTestingView";
+      this.Size = new System.Drawing.Size(924, 500);
+      this.contextMenuStrip1.ResumeLayout(false);
+      this.splitContainer1.Panel1.ResumeLayout(false);
+      this.splitContainer1.Panel1.PerformLayout();
+      this.splitContainer1.Panel2.ResumeLayout(false);
+      this.splitContainer1.Panel2.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+      this.splitContainer1.ResumeLayout(false);
+      this.splitContainer2.Panel1.ResumeLayout(false);
+      this.splitContainer2.Panel2.ResumeLayout(false);
+      this.splitContainer2.Panel2.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+      this.splitContainer2.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+    #endregion
+
+    private HeuristicLab.Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView;
+    private System.Windows.Forms.Label groupByLabel;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox resultComboBox;
+    private System.Windows.Forms.Button testButton;
+    private System.Windows.Forms.Button normalDistButton;
+    private System.Windows.Forms.Label lblPVal;
+    private System.Windows.Forms.TextBox pValTextBox;
+    private System.Windows.Forms.ComboBox groupComboBox;
+    private System.Windows.Forms.Button normalityDetails;
+    private System.Windows.Forms.Button pairwiseTestButton;
+    private System.Windows.Forms.Label infoLabel;
+    private System.Windows.Forms.ToolTip toolTip1;
+    private System.Windows.Forms.SplitContainer splitContainer1;
+    private System.Windows.Forms.SplitContainer splitContainer2;
+    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
+    private System.Windows.Forms.ToolStripMenuItem openBoxPlotToolStripMenuItem;
+  }
+}
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx	(revision 9353)
@@ -0,0 +1,209 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>114, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="infoLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+        HKDQkgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <data name="infoLabel.ToolTip" xml:space="preserve">
+    <value>This view offers tools for statistical analysis. 
+
+Check for normality of the data is done using the Jarque-Bera test.
+It requires a sample size of at least 5 samples. 
+
+Statistical hypothesis testing between all groups is performed using the Kruskal-Wallis test. 
+
+For pairwise comparision of the groups the Mann-Whitney U test is used. 
+It also requires sample sizes of at least 5 samples.
+
+The p-values calculated by the statistical tests are interpreted as follows:
+The null hypothesis states that the groups which are compared have the same distribution.
+A p-value &lt; 0.05 (this value is often chosen as significance level)  means the null hypothesis is rejected, 
+which therefore means that the distributions are not equal. 
+
+For the pariwise statistical test, in addition to the p-value, Cohen's d and Hedges' g are calculated.
+According to Wikipedia, these values can be interpreted as follows: "A lower Cohen's d indicates a necessity of larger sample sizes, and vice versa."</value>
+  </data>
+</root>
Index: /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/TTest.cs
===================================================================
--- /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/TTest.cs	(revision 9353)
+++ /branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/TTest.cs	(revision 9353)
@@ -0,0 +1,47 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class TTest {
+    public static double Test(double[] data1, double[] data2) {
+      double left, right, both;
+      alglib.studentttest2(data1, data1.Length, data2, data2.Length, out both, out left, out right);
+      return both;
+    }
+
+    public static double GetOptimalSampleSize(double[] data1, double[] data2, double conf = 0.95) {
+      double result = 0.0;
+      double t = alglib.invstudenttdistribution(data1.Length * 2 - 2, conf);
+
+      double m1 = data1.Average();
+      double m2 = data2.Average();
+      double s1 = data1.StandardDeviation();
+      double s2 = data2.StandardDeviation();
+
+      result = Math.Pow(t, 2) * (Math.Pow(s1, 2) + Math.Pow(s2, 2)) / Math.Pow(m1 - m2, 2);
+      return Math.Ceiling(result);
+    }
+  }
+}
Index: /branches/StatisticalTesting/PreBuildEvent.cmd
===================================================================
--- /branches/StatisticalTesting/PreBuildEvent.cmd	(revision 9353)
+++ /branches/StatisticalTesting/PreBuildEvent.cmd	(revision 9353)
@@ -0,0 +1,2 @@
+SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
+SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
