Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/19/20 19:07:40 (4 years ago)
Author:
fbaching
Message:

#1837: merged changes from trunk

  • apply changes from Attic release to all SlidingWindow specific code files (replace StorableClass with StorableType)
Location:
branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views

  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.Designer.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.Designer.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    6363      // weightInitializationMuTextBox
    6464      //
     65      this.weightInitializationMuTextBox.Size = new System.Drawing.Size(293, 20);
    6566      this.toolTip.SetToolTip(this.weightInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
    6667        "al weights.");
     
    6970      //
    7071      this.initializationGroupBox.Location = new System.Drawing.Point(6, 7);
    71       this.initializationGroupBox.Size = new System.Drawing.Size(379, 73);
     72      this.initializationGroupBox.Size = new System.Drawing.Size(391, 73);
    7273      //
    7374      // weightSigmaLabel
     
    7778      // weightInitializationSigmaTextBox
    7879      //
     80      this.weightInitializationSigmaTextBox.Size = new System.Drawing.Size(293, 20);
    7981      this.toolTip.SetToolTip(this.weightInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
    8082        "weights.");
     
    8385      //
    8486      this.mutationGroupBox.Location = new System.Drawing.Point(6, 86);
    85       this.mutationGroupBox.Size = new System.Drawing.Size(379, 73);
     87      this.mutationGroupBox.Size = new System.Drawing.Size(391, 95);
    8688      //
    8789      // multiplicativeWeightChangeLabel
    8890      //
     91      this.multiplicativeWeightChangeLabel.TabIndex = 4;
    8992      this.toolTip.SetToolTip(this.multiplicativeWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample a multiplicative" +
    9093        " change in weight.");
     
    9295      // multiplicativeWeightChangeSigmaTextBox
    9396      //
     97      this.multiplicativeWeightChangeSigmaTextBox.TabIndex = 5;
    9498      this.toolTip.SetToolTip(this.multiplicativeWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample a multiplica" +
    9599        "tive change in weight.");
     
    97101      // additiveWeightChangeLabel
    98102      //
     103      this.additiveWeightChangeLabel.TabIndex = 2;
    99104      this.toolTip.SetToolTip(this.additiveWeightChangeLabel, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
    100105        "change in weight.");
     
    102107      // additiveWeightChangeSigmaTextBox
    103108      //
     109      this.additiveWeightChangeSigmaTextBox.TabIndex = 3;
    104110      this.toolTip.SetToolTip(this.additiveWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
    105111        "change in weight.");
     
    111117      // parametersTabPage
    112118      //
    113       this.parametersTabPage.Size = new System.Drawing.Size(400, 149);
     119      this.parametersTabPage.Size = new System.Drawing.Size(412, 208);
    114120      //
    115121      // tabControl
    116122      //
    117123      this.tabControl.Location = new System.Drawing.Point(0, 179);
    118       this.tabControl.Size = new System.Drawing.Size(408, 175);
    119       this.tabControl.TabIndex = 9;
     124      this.tabControl.Size = new System.Drawing.Size(420, 234);
     125      this.tabControl.TabIndex = 13;
     126      //
     127      // varChangeProbTextBox
     128      //
     129      this.varChangeProbTextBox.TabIndex = 1;
     130      this.toolTip.SetToolTip(this.varChangeProbTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
     131        "change in weight.");
     132      //
     133      // varChangeProbLabel
     134      //
     135      this.varChangeProbLabel.TabIndex = 0;
     136      this.toolTip.SetToolTip(this.varChangeProbLabel, "The probability of changing the referenced variable in [0..1]. Variable reference" +
     137        "s are sampled uniformly.");
    120138      //
    121139      // initialFrequencyLabel
    122140      //
     141      this.initialFrequencyLabel.TabIndex = 2;
    123142      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
    124143      //
     
    126145      //
    127146      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     147      this.initialFrequencyTextBox.Size = new System.Drawing.Size(323, 20);
     148      this.initialFrequencyTextBox.TabIndex = 3;
     149      //
     150      // enabledCheckBox
     151      //
     152      this.enabledCheckBox.TabIndex = 8;
     153      //
     154      // minimumArityLabel
     155      //
     156      this.minimumArityLabel.TabIndex = 4;
     157      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
     158      //
     159      // maximumArityLabel
     160      //
     161      this.toolTip.SetToolTip(this.maximumArityLabel, "The maximum arity of the symbol");
    128162      //
    129163      // minimumArityTextBox
    130164      //
    131165      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    132       this.minimumArityTextBox.Size = new System.Drawing.Size(315, 20);
     166      this.minimumArityTextBox.Size = new System.Drawing.Size(327, 20);
     167      this.minimumArityTextBox.TabIndex = 5;
    133168      //
    134169      // maximumArityTextBox
    135170      //
    136171      this.errorProvider.SetIconAlignment(this.maximumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    137       this.maximumArityTextBox.Size = new System.Drawing.Size(315, 20);
     172      this.maximumArityTextBox.Size = new System.Drawing.Size(327, 20);
    138173      //
    139174      // nameTextBox
     
    141176      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    142177      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     178      this.nameTextBox.Size = new System.Drawing.Size(302, 20);
     179      //
     180      // infoLabel
     181      //
     182      this.infoLabel.Location = new System.Drawing.Point(401, 3);
    143183      //
    144184      // minTimeOffsetLabel
     
    148188      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
    149189      this.minTimeOffsetLabel.Size = new System.Drawing.Size(81, 13);
    150       this.minTimeOffsetLabel.TabIndex = 5;
     190      this.minTimeOffsetLabel.TabIndex = 9;
    151191      this.minTimeOffsetLabel.Text = "Min. time offset:";
    152192      //
     
    157197      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
    158198      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(84, 13);
    159       this.maxTimeOffsetLabel.TabIndex = 7;
     199      this.maxTimeOffsetLabel.TabIndex = 11;
    160200      this.maxTimeOffsetLabel.Text = "Max. time offset:";
    161201      //
    162202      // minTimeOffsetTextBox
    163203      //
    164       this.minTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     204      this.minTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    165205            | System.Windows.Forms.AnchorStyles.Right)));
    166206      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(93, 127);
    167207      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
    168       this.minTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
    169       this.minTimeOffsetTextBox.TabIndex = 6;
     208      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(327, 20);
     209      this.minTimeOffsetTextBox.TabIndex = 10;
    170210      this.minTimeOffsetTextBox.TextChanged += new System.EventHandler(this.minTimeOffsetTextBox_TextChanged);
    171211      //
    172212      // maxTimeOffsetTextBox
    173213      //
    174       this.maxTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     214      this.maxTimeOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    175215            | System.Windows.Forms.AnchorStyles.Right)));
    176216      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(93, 153);
    177217      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
    178       this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(315, 20);
    179       this.maxTimeOffsetTextBox.TabIndex = 8;
     218      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(327, 20);
     219      this.maxTimeOffsetTextBox.TabIndex = 12;
    180220      this.maxTimeOffsetTextBox.TextChanged += new System.EventHandler(this.maxTimeOffsetTextBox_TextChanged);
    181221      //
    182222      // LaggedVariableView
    183223      //
    184       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    185224      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    186225      this.Controls.Add(this.minTimeOffsetTextBox);
     
    189228      this.Controls.Add(this.maxTimeOffsetTextBox);
    190229      this.Name = "LaggedVariableView";
    191       this.Size = new System.Drawing.Size(408, 352);
     230      this.Size = new System.Drawing.Size(420, 411);
     231      this.Controls.SetChildIndex(this.enabledCheckBox, 0);
    192232      this.Controls.SetChildIndex(this.maxTimeOffsetTextBox, 0);
    193233      this.Controls.SetChildIndex(this.minTimeOffsetLabel, 0);
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/LaggedVariableView.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.Designer.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/TimeLagView.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.Designer.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    237237      // variableNamesTabPage
    238238      //
     239      this.variableNamesTabPage.BackColor = System.Drawing.SystemColors.Window;
    239240      this.variableNamesTabPage.Location = new System.Drawing.Point(4, 22);
    240241      this.variableNamesTabPage.Name = "variableNamesTabPage";
     
    243244      this.variableNamesTabPage.TabIndex = 0;
    244245      this.variableNamesTabPage.Text = "Variable Names";
    245       this.variableNamesTabPage.UseVisualStyleBackColor = true;
    246246      //
    247247      // parametersTabPage
    248248      //
     249      this.parametersTabPage.BackColor = System.Drawing.SystemColors.Window;
    249250      this.parametersTabPage.Controls.Add(this.initializationGroupBox);
    250251      this.parametersTabPage.Controls.Add(this.mutationGroupBox);
     
    255256      this.parametersTabPage.TabIndex = 1;
    256257      this.parametersTabPage.Text = "Parameters";
    257       this.parametersTabPage.UseVisualStyleBackColor = true;
    258258      //
    259259      // initializationGroupBox
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5454    private void RegisterVariableNamesViewContentEvents() {
    5555      variableNamesView.Content.ItemsAdded += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    56       variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     56      variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Removed);
    5757      variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    5858      variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     
    6464    private void DeregisterVariableNamesViewContentEvents() {
    6565      variableNamesView.Content.ItemsAdded -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    66       variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     66      variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Removed);
    6767      variableNamesView.Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    6868      variableNamesView.Content.CollectionReset -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     
    153153    }
    154154
     155    private void VariableNames_Removed(object sender, CollectionItemsChangedEventArgs<StringValue> e) {
     156      foreach (var newVar in e.Items)
     157        newVar.ValueChanged -= new EventHandler(Variable_ValueChanged);
     158      UpdateContent();
     159    }
     160
    155161    private void Variable_ValueChanged(object sender, EventArgs e) {
    156162      UpdateContent();
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.Designer.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5151      this.weightInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
    5252      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
     53      this.varChangeProbTextBox = new System.Windows.Forms.TextBox();
     54      this.varChangeProbLabel = new System.Windows.Forms.Label();
    5355      this.multiplicativeWeightChangeLabel = new System.Windows.Forms.Label();
    5456      this.multiplicativeWeightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     
    6769      // initialFrequencyLabel
    6870      //
     71      this.initialFrequencyLabel.TabIndex = 2;
    6972      this.toolTip.SetToolTip(this.initialFrequencyLabel, "Relative frequency of the symbol in randomly created trees");
    7073      //
     
    7376      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    7477      this.initialFrequencyTextBox.Size = new System.Drawing.Size(311, 20);
     78      this.initialFrequencyTextBox.TabIndex = 3;
     79      //
     80      // enabledCheckBox
     81      //
     82      this.enabledCheckBox.TabIndex = 8;
    7583      //
    7684      // minimumArityLabel
    7785      //
     86      this.minimumArityLabel.TabIndex = 4;
    7887      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
    7988      //
     
    8695      this.errorProvider.SetIconAlignment(this.minimumArityTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    8796      this.minimumArityTextBox.Size = new System.Drawing.Size(311, 20);
     97      this.minimumArityTextBox.TabIndex = 5;
    8898      //
    8999      // maximumArityTextBox
     
    114124      // weightInitializationMuTextBox
    115125      //
    116       this.weightInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     126      this.weightInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    117127            | System.Windows.Forms.AnchorStyles.Right)));
    118128      this.weightInitializationMuTextBox.Location = new System.Drawing.Point(92, 19);
     
    126136      // initializationGroupBox
    127137      //
    128       this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     138      this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    129139            | System.Windows.Forms.AnchorStyles.Right)));
    130140      this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
     
    151161      // weightInitializationSigmaTextBox
    152162      //
    153       this.weightInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     163      this.weightInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    154164            | System.Windows.Forms.AnchorStyles.Right)));
    155165      this.weightInitializationSigmaTextBox.Location = new System.Drawing.Point(92, 45);
     
    163173      // mutationGroupBox
    164174      //
    165       this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    166             | System.Windows.Forms.AnchorStyles.Right)));
     175      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     176            | System.Windows.Forms.AnchorStyles.Right)));
     177      this.mutationGroupBox.Controls.Add(this.varChangeProbTextBox);
     178      this.mutationGroupBox.Controls.Add(this.varChangeProbLabel);
    167179      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeLabel);
    168180      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeSigmaTextBox);
     
    171183      this.mutationGroupBox.Location = new System.Drawing.Point(6, 85);
    172184      this.mutationGroupBox.Name = "mutationGroupBox";
    173       this.mutationGroupBox.Size = new System.Drawing.Size(391, 73);
     185      this.mutationGroupBox.Size = new System.Drawing.Size(391, 97);
    174186      this.mutationGroupBox.TabIndex = 1;
    175187      this.mutationGroupBox.TabStop = false;
    176188      this.mutationGroupBox.Text = "Mutation";
    177189      //
     190      // varChangeProbTextBox
     191      //
     192      this.varChangeProbTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     193            | System.Windows.Forms.AnchorStyles.Right)));
     194      this.varChangeProbTextBox.Location = new System.Drawing.Point(201, 13);
     195      this.varChangeProbTextBox.Name = "varChangeProbTextBox";
     196      this.varChangeProbTextBox.Size = new System.Drawing.Size(184, 20);
     197      this.varChangeProbTextBox.TabIndex = 1;
     198      this.toolTip.SetToolTip(this.varChangeProbTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
     199        "change in weight.");
     200      this.varChangeProbTextBox.TextChanged += new System.EventHandler(this.VarProbTextBox_TextChanged);
     201      //
     202      // varChangeProbLabel
     203      //
     204      this.varChangeProbLabel.AutoSize = true;
     205      this.varChangeProbLabel.Location = new System.Drawing.Point(6, 16);
     206      this.varChangeProbLabel.Name = "varChangeProbLabel";
     207      this.varChangeProbLabel.Size = new System.Drawing.Size(134, 13);
     208      this.varChangeProbLabel.TabIndex = 0;
     209      this.varChangeProbLabel.Text = "Variable change probability";
     210      this.toolTip.SetToolTip(this.varChangeProbLabel, "The probability of changing the referenced variable in [0..1]. Variable reference" +
     211        "s are sampled uniformly.");
     212      //
    178213      // multiplicativeWeightChangeLabel
    179214      //
    180215      this.multiplicativeWeightChangeLabel.AutoSize = true;
    181       this.multiplicativeWeightChangeLabel.Location = new System.Drawing.Point(6, 48);
     216      this.multiplicativeWeightChangeLabel.Location = new System.Drawing.Point(6, 68);
    182217      this.multiplicativeWeightChangeLabel.Name = "multiplicativeWeightChangeLabel";
    183218      this.multiplicativeWeightChangeLabel.Size = new System.Drawing.Size(180, 13);
    184       this.multiplicativeWeightChangeLabel.TabIndex = 2;
     219      this.multiplicativeWeightChangeLabel.TabIndex = 4;
    185220      this.multiplicativeWeightChangeLabel.Text = "Multiplicative weight change (sigma):";
    186221      this.toolTip.SetToolTip(this.multiplicativeWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample a multiplicative" +
     
    189224      // multiplicativeWeightChangeSigmaTextBox
    190225      //
    191       this.multiplicativeWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    192             | System.Windows.Forms.AnchorStyles.Right)));
    193       this.multiplicativeWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 45);
     226      this.multiplicativeWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     227            | System.Windows.Forms.AnchorStyles.Right)));
     228      this.multiplicativeWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 65);
    194229      this.multiplicativeWeightChangeSigmaTextBox.Name = "multiplicativeWeightChangeSigmaTextBox";
    195230      this.multiplicativeWeightChangeSigmaTextBox.Size = new System.Drawing.Size(184, 20);
    196       this.multiplicativeWeightChangeSigmaTextBox.TabIndex = 3;
     231      this.multiplicativeWeightChangeSigmaTextBox.TabIndex = 5;
    197232      this.toolTip.SetToolTip(this.multiplicativeWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample a multiplica" +
    198233        "tive change in weight.");
     
    202237      //
    203238      this.additiveWeightChangeLabel.AutoSize = true;
    204       this.additiveWeightChangeLabel.Location = new System.Drawing.Point(6, 22);
     239      this.additiveWeightChangeLabel.Location = new System.Drawing.Point(6, 42);
    205240      this.additiveWeightChangeLabel.Name = "additiveWeightChangeLabel";
    206241      this.additiveWeightChangeLabel.Size = new System.Drawing.Size(157, 13);
    207       this.additiveWeightChangeLabel.TabIndex = 0;
     242      this.additiveWeightChangeLabel.TabIndex = 2;
    208243      this.additiveWeightChangeLabel.Text = "Additive weight change (sigma):";
    209244      this.toolTip.SetToolTip(this.additiveWeightChangeLabel, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
     
    212247      // additiveWeightChangeSigmaTextBox
    213248      //
    214       this.additiveWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    215             | System.Windows.Forms.AnchorStyles.Right)));
    216       this.additiveWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 19);
     249      this.additiveWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     250            | System.Windows.Forms.AnchorStyles.Right)));
     251      this.additiveWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 39);
    217252      this.additiveWeightChangeSigmaTextBox.Name = "additiveWeightChangeSigmaTextBox";
    218253      this.additiveWeightChangeSigmaTextBox.Size = new System.Drawing.Size(184, 20);
    219       this.additiveWeightChangeSigmaTextBox.TabIndex = 1;
     254      this.additiveWeightChangeSigmaTextBox.TabIndex = 3;
    220255      this.toolTip.SetToolTip(this.additiveWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
    221256        "change in weight.");
     
    224259      // tabControl
    225260      //
    226       this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    227             | System.Windows.Forms.AnchorStyles.Left) 
     261      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     262            | System.Windows.Forms.AnchorStyles.Left)
    228263            | System.Windows.Forms.AnchorStyles.Right)));
    229264      this.tabControl.Controls.Add(this.variableNamesTabPage);
     
    232267      this.tabControl.Name = "tabControl";
    233268      this.tabControl.SelectedIndex = 0;
    234       this.tabControl.Size = new System.Drawing.Size(408, 190);
    235       this.tabControl.TabIndex = 5;
     269      this.tabControl.Size = new System.Drawing.Size(408, 216);
     270      this.tabControl.TabIndex = 9;
    236271      //
    237272      // variableNamesTabPage
    238273      //
     274      this.variableNamesTabPage.BackColor = System.Drawing.SystemColors.Window;
    239275      this.variableNamesTabPage.Location = new System.Drawing.Point(4, 22);
    240276      this.variableNamesTabPage.Name = "variableNamesTabPage";
    241277      this.variableNamesTabPage.Padding = new System.Windows.Forms.Padding(3);
    242       this.variableNamesTabPage.Size = new System.Drawing.Size(400, 164);
     278      this.variableNamesTabPage.Size = new System.Drawing.Size(400, 190);
    243279      this.variableNamesTabPage.TabIndex = 0;
    244280      this.variableNamesTabPage.Text = "Variable Names";
    245       this.variableNamesTabPage.UseVisualStyleBackColor = true;
    246281      //
    247282      // parametersTabPage
    248283      //
     284      this.parametersTabPage.BackColor = System.Drawing.SystemColors.Window;
    249285      this.parametersTabPage.Controls.Add(this.mutationGroupBox);
    250286      this.parametersTabPage.Controls.Add(this.initializationGroupBox);
     
    252288      this.parametersTabPage.Name = "parametersTabPage";
    253289      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    254       this.parametersTabPage.Size = new System.Drawing.Size(400, 164);
     290      this.parametersTabPage.Size = new System.Drawing.Size(400, 190);
    255291      this.parametersTabPage.TabIndex = 1;
    256292      this.parametersTabPage.Text = "Parameters";
    257       this.parametersTabPage.UseVisualStyleBackColor = true;
    258293      //
    259294      // VariableView
    260295      //
    261       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    262296      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    263297      this.Controls.Add(this.tabControl);
    264298      this.Name = "VariableView";
    265       this.Size = new System.Drawing.Size(408, 317);
     299      this.Size = new System.Drawing.Size(408, 346);
     300      this.Controls.SetChildIndex(this.enabledCheckBox, 0);
    266301      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
    267302      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
     
    301336    protected System.Windows.Forms.TabPage parametersTabPage;
    302337    protected System.Windows.Forms.TabControl tabControl;
     338    protected System.Windows.Forms.TextBox varChangeProbTextBox;
     339    protected System.Windows.Forms.Label varChangeProbLabel;
    303340  }
    304341}
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs

    r9708 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2929using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
    3030using HeuristicLab.MainForm;
    31 using HeuristicLab.MainForm.WindowsForms;
    3231
    3332
    3433namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
    3534  [View("Variable View")]
    36   [Content(typeof(Variable), true)]
     35  [Content(typeof(VariableBase), true)]
    3736  public partial class VariableView : SymbolView {
    3837    private CheckedItemCollectionView<StringValue> variableNamesView;
    3938
    40     public new Variable Content {
    41       get { return (Variable)base.Content; }
     39    public new VariableBase Content {
     40      get { return (VariableBase)base.Content; }
    4241      set { base.Content = value; }
    4342    }
     
    5554    private void RegisterVariableNamesViewContentEvents() {
    5655      variableNamesView.Content.ItemsAdded += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    57       variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     56      variableNamesView.Content.ItemsRemoved += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Removed);
    5857      variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    5958      variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     
    6665    private void DeregisterVariableNamesViewContentEvents() {
    6766      variableNamesView.Content.ItemsAdded -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    68       variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     67      variableNamesView.Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Removed);
    6968      variableNamesView.Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
    7069      variableNamesView.Content.CollectionReset -= new CollectionItemsChangedEventHandler<StringValue>(VariableNames_Changed);
     
    101100      multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null;
    102101      multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
     102      varChangeProbTextBox.Enabled = Content != null;
     103      varChangeProbTextBox.ReadOnly = ReadOnly;
    103104    }
    104105
     
    118119    }
    119120
     121    private void VariableNames_Removed(object sender, CollectionItemsChangedEventArgs<StringValue> e) {
     122      foreach (var newVar in e.Items)
     123        newVar.ValueChanged -= new EventHandler(Variable_ValueChanged);
     124      UpdateContent();
     125    }
     126
    120127    private void Variable_ValueChanged(object sender, EventArgs e) {
    121128      UpdateContent();
     
    126133        Content.Fixed = true;
    127134        DeregisterContentEvents();
    128         Content.VariableNames = variableNamesView.Content.CheckedItems.Select(x => x.Value).ToList();
     135        Content.VariableNames = variableNamesView.Content.CheckedItems.Select(x => x.Value);
     136        Content.AllVariableNames = variableNamesView.Content.Select(x => x.Value);
    129137        RegisterContentEvents();
    130138      }
     
    166174      } else {
    167175        errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, "Invalid value");
     176      }
     177    }
     178
     179    private void VarProbTextBox_TextChanged(object sender, EventArgs e) {
     180      double prob;
     181      if (double.TryParse(varChangeProbTextBox.Text, out prob) && prob >= 0.0 && prob <= 1.0) {
     182        Content.VariableChangeProbability = prob;
     183        errorProvider.SetError(varChangeProbTextBox, string.Empty);
     184      } else {
     185        errorProvider.SetError(varChangeProbTextBox, "Invalid value");
    168186      }
    169187    }
     
    177195        additiveWeightChangeSigmaTextBox.Text = string.Empty;
    178196        multiplicativeWeightChangeSigmaTextBox.Text = string.Empty;
     197        varChangeProbTextBox.Text = string.Empty;
    179198        // temporarily deregister to prevent circular calling of events
    180199        DeregisterVariableNamesViewContentEvents();
     
    194213        additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString();
    195214        multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString();
     215        varChangeProbTextBox.Text = Content.VariableChangeProbability.ToString();
    196216      }
    197217      SetEnabledStateOfControls();
    198218    }
    199219    #endregion
     220
    200221  }
    201222}
Note: See TracChangeset for help on using the changeset viewer.