Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8492


Ignore:
Timestamp:
08/14/12 17:35:07 (12 years ago)
Author:
sforsten
Message:

#1292:

  • added TimeframeFeatureCorrelationView
Location:
branches/DatasetFeatureCorrelation
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs

    r8483 r8492  
    3434      this.maximumLabel = new System.Windows.Forms.Label();
    3535      this.PictureBox = new System.Windows.Forms.PictureBox();
     36      this.SplitContainer = new System.Windows.Forms.SplitContainer();
    3637      ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
    3738      ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
     39      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
     40      this.SplitContainer.Panel1.SuspendLayout();
     41      this.SplitContainer.Panel2.SuspendLayout();
     42      this.SplitContainer.SuspendLayout();
    3843      this.SuspendLayout();
    3944      //
     
    4247      this.DataGridView.AllowUserToAddRows = false;
    4348      this.DataGridView.AllowUserToDeleteRows = false;
    44       this.DataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    45                   | System.Windows.Forms.AnchorStyles.Left)
    46                   | System.Windows.Forms.AnchorStyles.Right)));
    4749      this.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    48       this.DataGridView.Location = new System.Drawing.Point(3, 33);
     50      this.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
     51      this.DataGridView.Location = new System.Drawing.Point(0, 0);
    4952      this.DataGridView.Name = "DataGridView";
    5053      this.DataGridView.ReadOnly = true;
    51       this.DataGridView.Size = new System.Drawing.Size(535, 300);
     54      this.DataGridView.Size = new System.Drawing.Size(475, 301);
    5255      this.DataGridView.TabIndex = 0;
    5356      this.DataGridView.VirtualMode = true;
     
    6063      this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6164                  | System.Windows.Forms.AnchorStyles.Right)));
    62       this.HeatMapProgressBar.Location = new System.Drawing.Point(476, 6);
     65      this.HeatMapProgressBar.Location = new System.Drawing.Point(490, 6);
    6366      this.HeatMapProgressBar.Name = "HeatMapProgressBar";
    6467      this.HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
    65       this.HeatMapProgressBar.Size = new System.Drawing.Size(141, 21);
     68      this.HeatMapProgressBar.Size = new System.Drawing.Size(76, 21);
    6669      this.HeatMapProgressBar.TabIndex = 9;
    6770      this.HeatMapProgressBar.Visible = false;
     
    7073      //
    7174      this.PartitionComboBox.FormattingEnabled = true;
    72       this.PartitionComboBox.Location = new System.Drawing.Point(336, 6);
     75      this.PartitionComboBox.Location = new System.Drawing.Point(348, 3);
    7376      this.PartitionComboBox.Name = "PartitionComboBox";
    74       this.PartitionComboBox.Size = new System.Drawing.Size(134, 21);
     77      this.PartitionComboBox.Size = new System.Drawing.Size(124, 21);
    7578      this.PartitionComboBox.TabIndex = 8;
    7679      this.PartitionComboBox.SelectedIndexChanged += new System.EventHandler(this.PartitionComboBox_SelectedIndexChanged);
     
    7982      //
    8083      this.CorrelationCalcLabel.AutoSize = true;
    81       this.CorrelationCalcLabel.Location = new System.Drawing.Point(3, 9);
     84      this.CorrelationCalcLabel.Location = new System.Drawing.Point(0, 6);
    8285      this.CorrelationCalcLabel.Name = "CorrelationCalcLabel";
    8386      this.CorrelationCalcLabel.Size = new System.Drawing.Size(104, 13);
     
    8891      //
    8992      this.CorrelationCalcComboBox.FormattingEnabled = true;
    90       this.CorrelationCalcComboBox.Location = new System.Drawing.Point(113, 6);
     93      this.CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);
    9194      this.CorrelationCalcComboBox.Name = "CorrelationCalcComboBox";
    9295      this.CorrelationCalcComboBox.Size = new System.Drawing.Size(163, 21);
     
    97100      //
    98101      this.PartitionLabel.AutoSize = true;
    99       this.PartitionLabel.Location = new System.Drawing.Point(282, 9);
     102      this.PartitionLabel.Location = new System.Drawing.Point(279, 6);
    100103      this.PartitionLabel.Name = "PartitionLabel";
    101104      this.PartitionLabel.Size = new System.Drawing.Size(48, 13);
     
    107110      this.minimumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    108111      this.minimumLabel.BackColor = System.Drawing.Color.Transparent;
    109       this.minimumLabel.Location = new System.Drawing.Point(544, 314);
     112      this.minimumLabel.Location = new System.Drawing.Point(487, 314);
    110113      this.minimumLabel.Name = "minimumLabel";
    111114      this.minimumLabel.Size = new System.Drawing.Size(73, 19);
     
    118121      this.maximumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    119122      this.maximumLabel.BackColor = System.Drawing.Color.Transparent;
    120       this.maximumLabel.Location = new System.Drawing.Point(544, 30);
     123      this.maximumLabel.Location = new System.Drawing.Point(487, 30);
    121124      this.maximumLabel.Name = "maximumLabel";
    122125      this.maximumLabel.Size = new System.Drawing.Size(73, 25);
     
    131134      this.PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
    132135      this.PictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));
    133       this.PictureBox.Location = new System.Drawing.Point(564, 58);
     136      this.PictureBox.Location = new System.Drawing.Point(507, 58);
    134137      this.PictureBox.Name = "PictureBox";
    135138      this.PictureBox.Size = new System.Drawing.Size(35, 253);
     
    138141      this.PictureBox.TabStop = false;
    139142      //
    140       // DataGridExtendedHeatMapView
     143      // SplitContainer
     144      //
     145      this.SplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     146                  | System.Windows.Forms.AnchorStyles.Left)
     147                  | System.Windows.Forms.AnchorStyles.Right)));
     148      this.SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     149      this.SplitContainer.IsSplitterFixed = true;
     150      this.SplitContainer.Location = new System.Drawing.Point(3, 3);
     151      this.SplitContainer.Name = "SplitContainer";
     152      this.SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
     153      //
     154      // SplitContainer.Panel1
     155      //
     156      this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcLabel);
     157      this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcComboBox);
     158      this.SplitContainer.Panel1.Controls.Add(this.PartitionComboBox);
     159      this.SplitContainer.Panel1.Controls.Add(this.PartitionLabel);
     160      //
     161      // SplitContainer.Panel2
     162      //
     163      this.SplitContainer.Panel2.Controls.Add(this.DataGridView);
     164      this.SplitContainer.Size = new System.Drawing.Size(475, 330);
     165      this.SplitContainer.SplitterDistance = 25;
     166      this.SplitContainer.TabIndex = 16;
     167      //
     168      // FeatureCorrelationView
    141169      //
    142170      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    143171      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     172      this.Controls.Add(this.SplitContainer);
    144173      this.Controls.Add(this.minimumLabel);
     174      this.Controls.Add(this.HeatMapProgressBar);
     175      this.Controls.Add(this.PictureBox);
    145176      this.Controls.Add(this.maximumLabel);
    146       this.Controls.Add(this.PictureBox);
    147       this.Controls.Add(this.PartitionLabel);
    148       this.Controls.Add(this.HeatMapProgressBar);
    149       this.Controls.Add(this.PartitionComboBox);
    150       this.Controls.Add(this.CorrelationCalcLabel);
    151       this.Controls.Add(this.CorrelationCalcComboBox);
    152       this.Controls.Add(this.DataGridView);
    153       this.Name = "DataGridExtendedHeatMapView";
    154       this.Size = new System.Drawing.Size(620, 336);
     177      this.Name = "FeatureCorrelationView";
     178      this.Size = new System.Drawing.Size(569, 336);
    155179      ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).EndInit();
    156180      ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
     181      this.SplitContainer.Panel1.ResumeLayout(false);
     182      this.SplitContainer.Panel1.PerformLayout();
     183      this.SplitContainer.Panel2.ResumeLayout(false);
     184      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
     185      this.SplitContainer.ResumeLayout(false);
    157186      this.ResumeLayout(false);
    158       this.PerformLayout();
    159187
    160188    }
     
    162190    #endregion
    163191
    164     private System.Windows.Forms.DataGridView DataGridView;
    165     private System.Windows.Forms.ProgressBar HeatMapProgressBar;
     192    protected System.Windows.Forms.DataGridView DataGridView;
     193    protected System.Windows.Forms.ProgressBar HeatMapProgressBar;
    166194    protected System.Windows.Forms.ComboBox PartitionComboBox;
    167195    protected System.Windows.Forms.Label CorrelationCalcLabel;
     
    171199    protected System.Windows.Forms.Label maximumLabel;
    172200    protected System.Windows.Forms.PictureBox PictureBox;
     201    protected System.Windows.Forms.SplitContainer SplitContainer;
    173202
    174203  }
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs

    r8483 r8492  
    5555      base.RegisterContentEvents();
    5656      Content.ProgressCalculation += new DataAnalysis.FeatureCorrelation.ProgressCalculationHandler(Content_ProgressCalculation);
    57       Content.Reset += new System.EventHandler(Content_Reset);
     57      Content.CorrelationCalculationFinished += new System.EventHandler(Content_CorrelationCalculationFinished);
    5858    }
    5959
    6060    protected override void DeregisterContentEvents() {
    61       Content.Reset -= new System.EventHandler(Content_Reset);
     61      Content.CorrelationCalculationFinished -= new System.EventHandler(Content_CorrelationCalculationFinished);
    6262      Content.ProgressCalculation -= new DataAnalysis.FeatureCorrelation.ProgressCalculationHandler(Content_ProgressCalculation);
    6363      base.DeregisterContentEvents();
     
    6969      } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {
    7070        HeatMapProgressBar.Hide();
    71         DataGridView.Enabled = true;
    7271      }
    7372      HeatMapProgressBar.Value = e.ProgressPercentage;
     
    8079        CorrelationCalcComboBox.DataSource = Content.CorrelationCalculators;
    8180        PartitionComboBox.DataSource = Content.Partitions;
    82         CalculateHeatMap();
     81        CalculateCorrelation();
    8382      }
    8483    }
    8584
    8685    protected void CorrelationMeasureComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    87       CalculateHeatMap();
     86      CalculateCorrelation();
    8887    }
    8988    protected void PartitionComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    90       CalculateHeatMap();
    91     }
    92 
    93     protected void CalculateHeatMap() {
     89      CalculateCorrelation();
     90    }
     91
     92    protected virtual void CalculateCorrelation() {
    9493      string calc = (string)CorrelationCalcComboBox.SelectedItem;
    9594      string partition = (string)PartitionComboBox.SelectedItem;
     
    9796        DataGridView.Enabled = false;
    9897        Content.Recalculate(calc, partition);
    99         base.OnContentChanged();
    10098      }
    10199    }
     
    115113      DataGridView.RowCount = Content.Rows;
    116114
     115      ClearSorting();
    117116      UpdateColumnHeaders();
    118117      UpdateRowHeaders();
     
    137136    }
    138137
    139     protected void Content_Reset(object sender, System.EventArgs e) {
    140       if (InvokeRequired)
    141         Invoke(new EventHandler(Content_Reset), sender, e);
    142       else {
     138    protected void Content_CorrelationCalculationFinished(object sender, System.EventArgs e) {
     139      if (InvokeRequired) {
     140        Invoke(new EventHandler(Content_CorrelationCalculationFinished), sender, e);
     141      } else {
    143142        UpdateDataGrid();
    144143      }
     
    159158      if (index < 0) index = 0;
    160159      return colors[index];
     160    }
     161
     162    protected override void OnShown(ViewShownEventArgs e) {
     163      base.OnShown(e);
     164      CalculateCorrelation();
    161165    }
    162166
     
    190194    }
    191195
     196    protected virtual void ClearSorting() {
     197      virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray();
     198      sortedColumnIndices.Clear();
     199      UpdateSortGlyph();
     200    }
     201
    192202    private void Sort() {
    193203      virtualRowIndices = Sort(sortedColumnIndices);
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r8483 r8492  
    172172      <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon>
    173173    </Compile>
     174    <Compile Include="TimeframeFeatureCorrelationView.cs">
     175      <SubType>UserControl</SubType>
     176    </Compile>
     177    <Compile Include="TimeframeFeatureCorrelationView.Designer.cs">
     178      <DependentUpon>TimeframeFeatureCorrelationView.cs</DependentUpon>
     179    </Compile>
    174180    <Compile Include="FeatureCorrelationView.cs">
    175181      <SubType>UserControl</SubType>
     
    348354    <EmbeddedResource Include="FeatureCorrelationView.resx">
    349355      <DependentUpon>FeatureCorrelationView.cs</DependentUpon>
     356    </EmbeddedResource>
     357    <EmbeddedResource Include="TimeframeFeatureCorrelationView.resx">
     358      <DependentUpon>TimeframeFeatureCorrelationView.cs</DependentUpon>
    350359    </EmbeddedResource>
    351360  </ItemGroup>
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs

    r8483 r8492  
    9898    }
    9999
     100    public void CalculateTimeframeElements(string calc, string partition, string variable, int frames) {
     101      CalculateElements(problemData.Dataset, calc, partition, variable, frames);
     102    }
     103
    100104    private void CalculateElements(Dataset dataset) {
    101105      CalculateElements(dataset, CorrelationCalculators.First(), Partitions.First());
    102106    }
    103107
    104     private void CalculateElements(Dataset dataset, string calc, string partition) {
     108    private void CalculateElements(Dataset dataset, string calc, string partition, string variable = null, int frames = 0) {
    105109      if (bw == null || bw.IsBusy) {
    106110        if (bw != null) {
     
    110114        bw.WorkerReportsProgress = true;
    111115        bw.WorkerSupportsCancellation = true;
    112         bw.DoWork += new DoWorkEventHandler(bw_DoWork);
    113         bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged);
    114         bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
    115       }
    116       bw.RunWorkerAsync(new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition });
     116        bw.DoWork += new DoWorkEventHandler(BwDoWork);
     117        bw.ProgressChanged += new ProgressChangedEventHandler(BwProgressChanged);
     118        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BwRunWorkerCompleted);
     119      }
     120      bw.RunWorkerAsync(new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames });
    117121      if (calc.Equals(PearsonsR) || calc.Equals(SpearmansRank)) {
    118122        Maximum = 1.0;
     
    127131    }
    128132
    129     private void bw_DoWork(object sender, DoWorkEventArgs e) {
     133    #region backgroundworker
     134    private void BwDoWork(object sender, DoWorkEventArgs e) {
     135      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
     136      if (bwInfo.Variable == null) {
     137        BwCalculateCorrelation(sender, e);
     138      } else {
     139        BwCalculateTimeframeCorrelation(sender, e);
     140      }
     141    }
     142
     143    private void BwCalculateCorrelation(object sender, DoWorkEventArgs e) {
    130144      BackgroundWorker worker = sender as BackgroundWorker;
    131145
     
    139153      int length = doubleVariableNames.Count;
    140154      double[,] elements = new double[length, length];
    141 
    142155      double calculations = (Math.Pow(length, 2) + length) / 2;
    143156
     
    151164          }
    152165
    153           IEnumerable<double> var1 = dataset.GetDoubleValues(doubleVariableNames[i]);
    154           IEnumerable<double> var2 = dataset.GetDoubleValues(doubleVariableNames[j]);
    155           if (partition.Equals(TrainingSamples)) {
    156             var1 = var1.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
    157             var2 = var2.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
    158           } else if (partition.Equals(TestSamples)) {
    159             var1 = var1.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
    160             var2 = var2.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
    161           }
    162 
    163           if (calc.Equals(HoeffdingsDependence)) {
    164             elements[i, j] = HoeffdingsDependenceCalculator.Calculate(var1, var2, out error);
    165           } else if (calc.Equals(SpearmansRank)) {
    166             elements[i, j] = SpearmansRankCorrelationCoefficientCalculator.Calculate(var1, var2, out error);
    167           } else if (calc.Equals(PearsonsRSquared)) {
    168             elements[i, j] = OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error);
    169           } else {
    170             elements[i, j] = OnlinePearsonsRSquaredCalculator.CalculateR(var1, var2, out error);
    171           }
     166          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
     167          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
     168
     169          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
     170
    172171          elements[j, i] = elements[i, j];
    173172          if (!error.Equals(OnlineCalculatorError.None)) {
     
    181180    }
    182181
    183     private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
     182    private void BwCalculateTimeframeCorrelation(object sender, DoWorkEventArgs e) {
     183      BackgroundWorker worker = sender as BackgroundWorker;
     184
     185      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
     186      Dataset dataset = bwInfo.Dataset;
     187      string partition = bwInfo.Partition;
     188      string calc = bwInfo.Calculator;
     189      string variable = bwInfo.Variable;
     190      int frames = bwInfo.Frames;
     191
     192      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
     193      OnlineCalculatorError error;
     194      int length = doubleVariableNames.Count;
     195      double[,] elements = new double[length, frames + 1];
     196      double calculations = (frames + 1) * length;
     197
     198      worker.ReportProgress(0);
     199
     200      for (int i = 0; i < length; i++) {
     201        for (int j = 0; j <= frames; j++) {
     202          if (worker.CancellationPending) {
     203            e.Cancel = true;
     204            return;
     205          }
     206
     207          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, variable);
     208          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
     209
     210          var valuesInFrame = var1.Take(j);
     211          var help = var1.Skip(j).ToList();
     212          help.AddRange(valuesInFrame);
     213          var1 = help;
     214
     215          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
     216
     217          if (!error.Equals(OnlineCalculatorError.None)) {
     218            worker.ReportProgress(100);
     219            throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator.");
     220          }
     221          worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
     222        }
     223      }
     224      e.Result = elements;
     225    }
     226
     227    private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) {
     228      IEnumerable<double> var = problemData.Dataset.GetDoubleValues(variable);
     229      if (partition.Equals(TrainingSamples)) {
     230        var = var.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
     231      } else if (partition.Equals(TestSamples)) {
     232        var = var.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
     233      }
     234      return var;
     235    }
     236
     237    private double CalculateElementWithCalculator(string calc, IEnumerable<double> var1, IEnumerable<double> var2, out OnlineCalculatorError error) {
     238      if (calc.Equals(HoeffdingsDependence)) {
     239        return HoeffdingsDependenceCalculator.Calculate(var1, var2, out error);
     240      } else if (calc.Equals(SpearmansRank)) {
     241        return SpearmansRankCorrelationCoefficientCalculator.Calculate(var1, var2, out error);
     242      } else if (calc.Equals(PearsonsRSquared)) {
     243        return OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error);
     244      } else {
     245        return OnlinePearsonsRSquaredCalculator.CalculateR(var1, var2, out error);
     246      }
     247    }
     248
     249    private void BwRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
    184250      BackgroundWorker worker = sender as BackgroundWorker;
    185251      if (!e.Cancelled && !worker.CancellationPending) {
     
    188254        } else {
    189255          matrix = (double[,])e.Result;
    190           OnReset();
    191         }
    192       }
    193     }
     256          OnCorrelationCalculationFinished();
     257        }
     258      }
     259    }
     260    #endregion
    194261
    195262    #region events
     263    public event EventHandler CorrelationCalculationFinished;
     264    protected virtual void OnCorrelationCalculationFinished() {
     265      EventHandler handler = CorrelationCalculationFinished;
     266      if (handler != null)
     267        handler(this, EventArgs.Empty);
     268    }
     269
    196270    public delegate void ProgressCalculationHandler(object sender, ProgressChangedEventArgs e);
    197271    public event ProgressCalculationHandler ProgressCalculation;
    198     protected void bw_ProgressChanged(object sender, ProgressChangedEventArgs e) {
     272    protected void BwProgressChanged(object sender, ProgressChangedEventArgs e) {
    199273      BackgroundWorker worker = sender as BackgroundWorker;
    200274      if (!worker.CancellationPending && ProgressCalculation != null) {
     
    215289      public string Calculator { get; set; }
    216290      public string Partition { get; set; }
     291      public string Variable { get; set; }
     292      public int Frames { get; set; }
    217293    }
    218294  }
Note: See TracChangeset for help on using the changeset viewer.