Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/10/22 10:15:25 (2 years ago)
Author:
dpiringe
Message:

#3138

  • merged trunk into branch
Location:
branches/3138_Shape_Constraints_Transformations
Files:
14 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/3138_Shape_Constraints_Transformations

  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views

  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r18052 r18180  
    129129    </Compile>
    130130    <Compile Include="Plugin.cs" />
     131    <Compile Include="Symbols\ConstantView.cs">
     132      <SubType>UserControl</SubType>
     133    </Compile>
     134    <Compile Include="Symbols\ConstantView.Designer.cs">
     135      <DependentUpon>ConstantView.cs</DependentUpon>
     136    </Compile>
     137    <Compile Include="Symbols\NumberView.cs">
     138      <SubType>UserControl</SubType>
     139    </Compile>
     140    <Compile Include="Symbols\NumberView.Designer.cs">
     141      <DependentUpon>NumberView.cs</DependentUpon>
     142    </Compile>
    131143    <Compile Include="TextualSymbolicDataAnalysisModelView.cs">
    132144      <SubType>UserControl</SubType>
     
    146158    <Compile Include="GraphicalSymbolicDataAnalysisModelView.designer.cs">
    147159      <DependentUpon>GraphicalSymbolicDataAnalysisModelView.cs</DependentUpon>
    148     </Compile>
    149     <Compile Include="Symbols\ConstantView.cs">
    150       <SubType>UserControl</SubType>
    151     </Compile>
    152     <Compile Include="Symbols\ConstantView.Designer.cs">
    153       <DependentUpon>ConstantView.cs</DependentUpon>
    154160    </Compile>
    155161    <Compile Include="Symbols\LaggedVariableView.cs">
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs

    r17430 r18180  
    5454      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
    5555      this.btnSimplify = new System.Windows.Forms.Button();
    56       this.btnOptimizeConstants = new System.Windows.Forms.Button();
     56      this.btnOptimizeParameters = new System.Windows.Forms.Button();
    5757      this.grpViewHost = new System.Windows.Forms.GroupBox();
    5858      this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart();
     
    132132            | System.Windows.Forms.AnchorStyles.Right)));
    133133      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
    134       this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
     134      this.flowLayoutPanel.Controls.Add(this.btnOptimizeParameters);
    135135      this.flowLayoutPanel.Location = new System.Drawing.Point(6, 370);
    136136      this.flowLayoutPanel.Name = "flowLayoutPanel";
     
    153153      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
    154154      //
    155       // btnOptimizeConstants
    156       //
    157       this.btnOptimizeConstants.AutoSize = true;
    158       this.btnOptimizeConstants.Enabled = false;
    159       this.btnOptimizeConstants.Image = HeuristicLab.Common.Resources.VSImageLibrary.Performance;
    160       this.btnOptimizeConstants.Location = new System.Drawing.Point(89, 3);
    161       this.btnOptimizeConstants.Name = "btnOptimizeConstants";
    162       this.btnOptimizeConstants.Size = new System.Drawing.Size(80, 24);
    163       this.btnOptimizeConstants.TabIndex = 2;
    164       this.btnOptimizeConstants.Text = "Optimize";
    165       this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    166       this.toolTip.SetToolTip(this.btnOptimizeConstants, "Optimizes the numerical constants of the model. \r\nIf the algorithm converges, opt" +
     155      // btnOptimizeParameters
     156      //
     157      this.btnOptimizeParameters.AutoSize = true;
     158      this.btnOptimizeParameters.Enabled = false;
     159      this.btnOptimizeParameters.Image = HeuristicLab.Common.Resources.VSImageLibrary.Performance;
     160      this.btnOptimizeParameters.Location = new System.Drawing.Point(89, 3);
     161      this.btnOptimizeParameters.Name = "btnOptimizeParameters";
     162      this.btnOptimizeParameters.Size = new System.Drawing.Size(80, 24);
     163      this.btnOptimizeParameters.TabIndex = 2;
     164      this.btnOptimizeParameters.Text = "Optimize";
     165      this.btnOptimizeParameters.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
     166      this.toolTip.SetToolTip(this.btnOptimizeParameters, "Optimizes the parameters of the model. \r\nIf the algorithm converges, opt" +
    167167        "imization is stopped.");
    168       this.btnOptimizeConstants.UseVisualStyleBackColor = true;
    169       this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
     168      this.btnOptimizeParameters.UseVisualStyleBackColor = true;
     169      this.btnOptimizeParameters.Click += new System.EventHandler(this.btnOptimizeParameters_Click);
    170170      //
    171171      // grpViewHost
     
    228228    private System.Windows.Forms.Button btnSimplify;
    229229    private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
    230     protected System.Windows.Forms.Button btnOptimizeConstants;
     230    protected System.Windows.Forms.Button btnOptimizeParameters;
    231231    private System.Windows.Forms.Label treeStatusValue;
    232232    private System.Windows.Forms.ToolTip toolTip;
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17579 r18180  
    109109
    110110    // the optimizer always assumes 2 children for multiplication and addition nodes
    111     // thus, we enforce that the tree stays valid so that the constant optimization won't throw an exception
     111    // thus, we enforce that the tree stays valid so that the parameter optimization won't throw an exception
    112112    // by returning 2 as the minimum allowed arity for addition and multiplication symbols
    113113    private readonly Func<ISymbol, int> GetMinArity = symbol => {
     
    130130
    131131      if (valid) {
    132         btnOptimizeConstants.Enabled = true;
     132        btnOptimizeParameters.Enabled = true;
    133133        btnSimplify.Enabled = true;
    134134        treeStatusValue.Visible = false;
    135135      } else {
    136         btnOptimizeConstants.Enabled = false;
     136        btnOptimizeParameters.Enabled = false;
    137137        btnSimplify.Enabled = false;
    138138        treeStatusValue.Visible = true;
     
    193193      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
    194194
    195       progress.Start("Calculate Impact and Replacement Values ...");
     195      progress.Start("Calculate impact and replacement values ...");
    196196      cancellationTokenSource = new CancellationTokenSource();
    197197      progress.CanBeStopped = true;
     
    203203
    204204        var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2);
    205         foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
    206           foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
     205        foreach (var pair in replacementValues.Where(pair => !(pair.Key is INumericTreeNode))) {
     206          foldedNodes[pair.Key] = MakeNumberTreeNode(pair.Value);
    207207        }
    208208       
     
    235235      foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix()) {
    236236        if (progress.ProgressState == ProgressState.StopRequested) continue;
    237         double impactValue, replacementValue, newQualityForImpactsCalculation;
    238         impactCalculator.CalculateImpactAndReplacementValues(Content.Model, node, Content.ProblemData, Content.ProblemData.TrainingIndices, out impactValue, out replacementValue, out newQualityForImpactsCalculation);
     237        impactCalculator.CalculateImpactAndReplacementValues(Content.Model, node, Content.ProblemData, Content.ProblemData.TrainingIndices,
     238          out double impactValue, out double replacementValue, out _);
    239239        double newProgressValue = progress.ProgressValue + 1.0 / (tree.Length - 2);
    240240        progress.ProgressValue = Math.Min(newProgressValue, 1);
     
    246246    protected abstract void UpdateModel(ISymbolicExpressionTree tree);
    247247
    248     protected virtual ISymbolicExpressionTree OptimizeConstants(ISymbolicExpressionTree tree, IProgress progress) {
     248    protected virtual ISymbolicExpressionTree OptimizeParameters(ISymbolicExpressionTree tree, IProgress progress) {
    249249      return tree;
    250250    }
    251251
    252     private static ConstantTreeNode MakeConstantTreeNode(double value) {
    253       var constant = new Constant { MinValue = value - 1, MaxValue = value + 1 };
    254       var constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
    255       constantTreeNode.Value = value;
    256       return constantTreeNode;
     252    private static NumberTreeNode MakeNumberTreeNode(double value) {
     253      var num = new Number { MinValue = value - 1, MaxValue = value + 1 };
     254      var numTreeNode = (NumberTreeNode)num.CreateTreeNode();
     255      numTreeNode.Value = value;
     256      return numTreeNode;
    257257    }
    258258
     
    297297        VisualTreeNode<ISymbolicExpressionTreeNode> visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
    298298
    299         if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
     299        if (!(treeNode is INumericTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
    300300          visualTree.ToolTip = visualTree.Content.ToString();
    301301          double impact = nodeImpacts[treeNode];
     
    314314          }
    315315          visualTree.ToolTip += Environment.NewLine + "Node impact: " + impact;
    316           var constantReplacementNode = foldedNodes[treeNode] as ConstantTreeNode;
    317           if (constantReplacementNode != null) {
    318             visualTree.ToolTip += Environment.NewLine + "Replacement value: " + constantReplacementNode.Value;
     316          if (foldedNodes[treeNode] is INumericTreeNode numReplacementNode) {
     317            visualTree.ToolTip += Environment.NewLine + "Replacement value: " + numReplacementNode.Value;
    319318          }
    320319        }
    321320        if (visualTree != null) {
    322321          if (nodeIntervals.ContainsKey(treeNode))
    323             visualTree.ToolTip += String.Format($"{Environment.NewLine}Intervals: [{nodeIntervals[treeNode].LowerBound:G5} ... {nodeIntervals[treeNode].UpperBound:G5}]");
     322            visualTree.ToolTip += string.Format($"{Environment.NewLine}Intervals: [{nodeIntervals[treeNode].LowerBound:G5} ... {nodeIntervals[treeNode].UpperBound:G5}]");
    324323          if (changedNodes.ContainsKey(treeNode)) {
    325324            visualTree.LineColor = Color.DodgerBlue;
    326           } else if (treeNode is ConstantTreeNode && foldedNodes.ContainsKey(treeNode)) {
     325          } else if (treeNode is INumericTreeNode && foldedNodes.ContainsKey(treeNode)) {
    327326            visualTree.LineColor = Color.DarkOrange;
    328327          }
     
    337336    }
    338337
    339     private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    340       progress.Start("Optimizing Constants ...");
     338    private async void btnOptimizeParameters_Click(object sender, EventArgs e) {
     339      progress.Start("Optimizing parameters ...");
    341340      cancellationTokenSource = new CancellationTokenSource();
    342341      progress.CanBeStopped = true;
     
    344343        var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
    345344
    346         var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
     345        var newTree = await Task.Run(() => OptimizeParameters(tree, progress));
    347346        try {
    348347          await Task.Delay(300, cancellationTokenSource.Token); // wait for progressbar to finish animation
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.Designer.cs

    r17180 r18180  
    6464      this.insertNodeToolStripMenuItem.Name = "insertNodeToolStripMenuItem";
    6565      this.insertNodeToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    66       this.insertNodeToolStripMenuItem.Text = "Insert Node";
     66      this.insertNodeToolStripMenuItem.Text = "Insert node";
    6767      this.insertNodeToolStripMenuItem.Click += new System.EventHandler(this.insertNodeToolStripMenuItem_Click);
    6868      //
     
    7171      this.changeNodeToolStripMenuItem.Name = "changeNodeToolStripMenuItem";
    7272      this.changeNodeToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    73       this.changeNodeToolStripMenuItem.Text = "Change Node";
     73      this.changeNodeToolStripMenuItem.Text = "Change node";
    7474      this.changeNodeToolStripMenuItem.Click += new System.EventHandler(this.changeNodeToolStripMenuItem_Click);
    7575      //
     
    7878      this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
    7979      this.cutToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    80       this.cutToolStripMenuItem.Text = "Cut Subtree";
     80      this.cutToolStripMenuItem.Text = "Cut subtree";
    8181      this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
    8282      //
     
    109109      this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
    110110      this.pasteToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    111       this.pasteToolStripMenuItem.Text = "Paste Subtree";
     111      this.pasteToolStripMenuItem.Text = "Paste subtree";
    112112      this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Clicked);
    113113      //
     
    121121      this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
    122122      this.copyToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
    123       this.copyToolStripMenuItem.Text = "Copy Subtree";
     123      this.copyToolStripMenuItem.Text = "Copy subtree";
    124124      this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
    125125      //
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs

    r17180 r18180  
    2828
    2929namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
    30   internal delegate void
    31   ModifyTree(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild, bool removeSubtree = true);
     30  internal delegate void ModifyTree(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild,
     31                                    bool removeSubtree = true);
    3232
    3333  internal sealed partial class InteractiveSymbolicExpressionTreeChart : SymbolicExpressionTreeChart {
     
    8282
    8383    protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
    84       currSelected = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender; ;
     84      currSelected = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender;
    8585      base.OnSymbolicExpressionTreeNodeClicked(sender, e);
    8686    }
     
    104104        var symbol = dialog.SelectedSymbol;
    105105        var node = symbol.CreateTreeNode();
    106         if (node is ConstantTreeNode) {
    107           var constant = node as ConstantTreeNode;
    108           constant.Value = double.Parse(dialog.constantValueTextBox.Text);
     106        if (node is NumberTreeNode numTreeNode) {
     107          numTreeNode.Value = double.Parse(dialog.numberValueTextBox.Text);
    109108        } else if (node is VariableTreeNode) {
    110109          var variable = node as VariableTreeNode;
     
    133132      ISymbolicExpressionTreeNode newNode = null;
    134133      var result = DialogResult.Cancel;
    135       if (node is ConstantTreeNode) {
    136         using (var dialog = new ConstantNodeEditDialog(node)) {
     134      if (node is NumberTreeNode) {
     135        using (var dialog = new NumberNodeEditDialog(node)) {
    137136          dialog.ShowDialog(this);
    138137          newNode = dialog.NewNode;
     
    200199      // check if the copied/cut node (stored in the tempNode) can be inserted as a child of the current selected node
    201200      var node = currSelected.Content;
    202       if (node is ConstantTreeNode || node is VariableTreeNode) return;
     201      if (node is INumericTreeNode || node is VariableTreeNode) return;
    203202      // check if the currently selected node can accept the copied node as a child
    204203      // no need to check the grammar, an arity check will do just fine here
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.Designer.cs

    r17180 r18180  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.weightNuLabel = new System.Windows.Forms.Label();
    48       this.minValueTextBox = new System.Windows.Forms.TextBox();
    49       this.initializationGroupBox = new System.Windows.Forms.GroupBox();
    50       this.weightSigmaLabel = new System.Windows.Forms.Label();
    51       this.maxValueTextBox = new System.Windows.Forms.TextBox();
    52       this.mutationGroupBox = new System.Windows.Forms.GroupBox();
    53       this.multiplicativeChangeLabel = new System.Windows.Forms.Label();
    54       this.multiplicativeChangeSigmaTextBox = new System.Windows.Forms.TextBox();
    55       this.additiveChangeLabel = new System.Windows.Forms.Label();
    56       this.additiveChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     47      this.valueLabel = new System.Windows.Forms.Label();
     48      this.valueTextBox = new System.Windows.Forms.TextBox();
    5749      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    58       this.initializationGroupBox.SuspendLayout();
    59       this.mutationGroupBox.SuspendLayout();
    6050      this.SuspendLayout();
    6151      //
     
    6858      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    6959      this.initialFrequencyTextBox.Size = new System.Drawing.Size(280, 20);
     60      //
     61      // minimumArityLabel
     62      //
     63      this.toolTip.SetToolTip(this.minimumArityLabel, "The minimum arity of the symbol");
     64      //
     65      // maximumArityLabel
     66      //
     67      this.toolTip.SetToolTip(this.maximumArityLabel, "The maximum arity of the symbol");
    7068      //
    7169      // minimumArityTextBox
     
    8987      this.infoLabel.Location = new System.Drawing.Point(379, 3);
    9088      //
    91       // weightNuLabel
     89      // valueLabel
    9290      //
    93       this.weightNuLabel.AutoSize = true;
    94       this.weightNuLabel.Location = new System.Drawing.Point(6, 22);
    95       this.weightNuLabel.Name = "weightNuLabel";
    96       this.weightNuLabel.Size = new System.Drawing.Size(56, 13);
    97       this.weightNuLabel.TabIndex = 0;
    98       this.weightNuLabel.Text = "Min value:";
    99       this.toolTip.SetToolTip(this.weightNuLabel, "The minimal value to use for random initialization of constants.");
     91      this.valueLabel.AutoSize = true;
     92      this.valueLabel.Location = new System.Drawing.Point(3, 130);
     93      this.valueLabel.Name = "valueLabel";
     94      this.valueLabel.Size = new System.Drawing.Size(37, 13);
     95      this.valueLabel.TabIndex = 0;
     96      this.valueLabel.Text = "Value:";
     97      this.toolTip.SetToolTip(this.valueLabel, "The value of the constant.");
    10098      //
    101       // minValueTextBox
     99      // valueTextBox
    102100      //
    103       this.minValueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     101      this.valueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    104102            | System.Windows.Forms.AnchorStyles.Right)));
    105       this.errorProvider.SetIconAlignment(this.minValueTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    106       this.minValueTextBox.Location = new System.Drawing.Point(92, 19);
    107       this.minValueTextBox.Name = "minValueTextBox";
    108       this.minValueTextBox.Size = new System.Drawing.Size(300, 20);
    109       this.minValueTextBox.TabIndex = 1;
    110       this.toolTip.SetToolTip(this.minValueTextBox, "The minimal value to use for random initialization of constants.");
    111       this.minValueTextBox.TextChanged += new System.EventHandler(this.minValueTextBox_TextChanged);
    112       //
    113       // initializationGroupBox
    114       //
    115       this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    116             | System.Windows.Forms.AnchorStyles.Right)));
    117       this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
    118       this.initializationGroupBox.Controls.Add(this.maxValueTextBox);
    119       this.initializationGroupBox.Controls.Add(this.weightNuLabel);
    120       this.initializationGroupBox.Controls.Add(this.minValueTextBox);
    121       this.initializationGroupBox.Location = new System.Drawing.Point(0, 127);
    122       this.initializationGroupBox.Name = "initializationGroupBox";
    123       this.initializationGroupBox.Size = new System.Drawing.Size(398, 73);
    124       this.initializationGroupBox.TabIndex = 5;
    125       this.initializationGroupBox.TabStop = false;
    126       this.initializationGroupBox.Text = "Initialization";
    127       //
    128       // weightSigmaLabel
    129       //
    130       this.weightSigmaLabel.AutoSize = true;
    131       this.weightSigmaLabel.Location = new System.Drawing.Point(6, 48);
    132       this.weightSigmaLabel.Name = "weightSigmaLabel";
    133       this.weightSigmaLabel.Size = new System.Drawing.Size(59, 13);
    134       this.weightSigmaLabel.TabIndex = 2;
    135       this.weightSigmaLabel.Text = "Max value:";
    136       this.toolTip.SetToolTip(this.weightSigmaLabel, "The maximal value to use for random initialization of constants.");
    137       //
    138       // maxValueTextBox
    139       //
    140       this.maxValueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    141             | System.Windows.Forms.AnchorStyles.Right)));
    142       this.errorProvider.SetIconAlignment(this.maxValueTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    143       this.maxValueTextBox.Location = new System.Drawing.Point(92, 45);
    144       this.maxValueTextBox.Name = "maxValueTextBox";
    145       this.maxValueTextBox.Size = new System.Drawing.Size(300, 20);
    146       this.maxValueTextBox.TabIndex = 3;
    147       this.toolTip.SetToolTip(this.maxValueTextBox, "The maximal value to use for random initialization of constants.");
    148       this.maxValueTextBox.TextChanged += new System.EventHandler(this.maxValueTextBox_TextChanged);
    149       //
    150       // mutationGroupBox
    151       //
    152       this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    153             | System.Windows.Forms.AnchorStyles.Right)));
    154       this.mutationGroupBox.Controls.Add(this.multiplicativeChangeLabel);
    155       this.mutationGroupBox.Controls.Add(this.multiplicativeChangeSigmaTextBox);
    156       this.mutationGroupBox.Controls.Add(this.additiveChangeLabel);
    157       this.mutationGroupBox.Controls.Add(this.additiveChangeSigmaTextBox);
    158       this.mutationGroupBox.Location = new System.Drawing.Point(0, 206);
    159       this.mutationGroupBox.Name = "mutationGroupBox";
    160       this.mutationGroupBox.Size = new System.Drawing.Size(398, 73);
    161       this.mutationGroupBox.TabIndex = 6;
    162       this.mutationGroupBox.TabStop = false;
    163       this.mutationGroupBox.Text = "Mutation";
    164       //
    165       // multiplicativeChangeLabel
    166       //
    167       this.multiplicativeChangeLabel.AutoSize = true;
    168       this.multiplicativeChangeLabel.Location = new System.Drawing.Point(6, 48);
    169       this.multiplicativeChangeLabel.Name = "multiplicativeChangeLabel";
    170       this.multiplicativeChangeLabel.Size = new System.Drawing.Size(146, 13);
    171       this.multiplicativeChangeLabel.TabIndex = 2;
    172       this.multiplicativeChangeLabel.Text = "Multiplicative change (sigma):";
    173       this.toolTip.SetToolTip(this.multiplicativeChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to use to sample the " +
    174         "multiplicative change.");
    175       //
    176       // multiplicativeChangeSigmaTextBox
    177       //
    178       this.multiplicativeChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    179             | System.Windows.Forms.AnchorStyles.Right)));
    180       this.errorProvider.SetIconAlignment(this.multiplicativeChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    181       this.multiplicativeChangeSigmaTextBox.Location = new System.Drawing.Point(168, 45);
    182       this.multiplicativeChangeSigmaTextBox.Name = "multiplicativeChangeSigmaTextBox";
    183       this.multiplicativeChangeSigmaTextBox.Size = new System.Drawing.Size(224, 20);
    184       this.multiplicativeChangeSigmaTextBox.TabIndex = 3;
    185       this.toolTip.SetToolTip(this.multiplicativeChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample a mu" +
    186         "ltiplicative change.");
    187       this.multiplicativeChangeSigmaTextBox.TextChanged += new System.EventHandler(this.multiplicativeChangeSigmaTextBox_TextChanged);
    188       //
    189       // additiveChangeLabel
    190       //
    191       this.additiveChangeLabel.AutoSize = true;
    192       this.additiveChangeLabel.Location = new System.Drawing.Point(6, 22);
    193       this.additiveChangeLabel.Name = "additiveChangeLabel";
    194       this.additiveChangeLabel.Size = new System.Drawing.Size(123, 13);
    195       this.additiveChangeLabel.TabIndex = 0;
    196       this.additiveChangeLabel.Text = "Additive change (sigma):";
    197       this.toolTip.SetToolTip(this.additiveChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to sample the additiv" +
    198         "e change.");
    199       //
    200       // additiveChangeSigmaTextBox
    201       //
    202       this.additiveChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    203             | System.Windows.Forms.AnchorStyles.Right)));
    204       this.errorProvider.SetIconAlignment(this.additiveChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    205       this.additiveChangeSigmaTextBox.Location = new System.Drawing.Point(168, 19);
    206       this.additiveChangeSigmaTextBox.Name = "additiveChangeSigmaTextBox";
    207       this.additiveChangeSigmaTextBox.Size = new System.Drawing.Size(224, 20);
    208       this.additiveChangeSigmaTextBox.TabIndex = 1;
    209       this.toolTip.SetToolTip(this.additiveChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample an a" +
    210         "dditive change.");
    211       this.additiveChangeSigmaTextBox.TextChanged += new System.EventHandler(this.additiveChangeSigmaTextBox_TextChanged);
     103      this.errorProvider.SetIconAlignment(this.valueTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     104      this.valueTextBox.Location = new System.Drawing.Point(93, 127);
     105      this.valueTextBox.Name = "valueTextBox";
     106      this.valueTextBox.Size = new System.Drawing.Size(280, 20);
     107      this.valueTextBox.TabIndex = 1;
     108      this.toolTip.SetToolTip(this.valueTextBox, "The value of the constant.");
     109      this.valueTextBox.TextChanged += new System.EventHandler(this.valueTextBox_TextChanged);
    212110      //
    213111      // ConstantView
    214112      //
    215       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    216113      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    217       this.Controls.Add(this.mutationGroupBox);
    218       this.Controls.Add(this.initializationGroupBox);
     114      this.Controls.Add(this.valueLabel);
     115      this.Controls.Add(this.valueTextBox);
    219116      this.Name = "ConstantView";
    220       this.Size = new System.Drawing.Size(398, 284);
     117      this.Size = new System.Drawing.Size(398, 168);
     118      this.Controls.SetChildIndex(this.valueTextBox, 0);
     119      this.Controls.SetChildIndex(this.valueLabel, 0);
     120      this.Controls.SetChildIndex(this.enabledCheckBox, 0);
     121      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
     122      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
    221123      this.Controls.SetChildIndex(this.maximumArityLabel, 0);
    222124      this.Controls.SetChildIndex(this.maximumArityTextBox, 0);
     
    224126      this.Controls.SetChildIndex(this.minimumArityTextBox, 0);
    225127      this.Controls.SetChildIndex(this.infoLabel, 0);
    226       this.Controls.SetChildIndex(this.initializationGroupBox, 0);
    227       this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
    228       this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
    229128      this.Controls.SetChildIndex(this.nameLabel, 0);
    230129      this.Controls.SetChildIndex(this.nameTextBox, 0);
    231       this.Controls.SetChildIndex(this.mutationGroupBox, 0);
    232130      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    233       this.initializationGroupBox.ResumeLayout(false);
    234       this.initializationGroupBox.PerformLayout();
    235       this.mutationGroupBox.ResumeLayout(false);
    236       this.mutationGroupBox.PerformLayout();
    237131      this.ResumeLayout(false);
    238132      this.PerformLayout();
     
    242136    #endregion
    243137
    244     private System.Windows.Forms.Label weightNuLabel;
    245     private System.Windows.Forms.TextBox minValueTextBox;
    246     protected System.Windows.Forms.GroupBox initializationGroupBox;
    247     private System.Windows.Forms.Label weightSigmaLabel;
    248     private System.Windows.Forms.TextBox maxValueTextBox;
    249     protected System.Windows.Forms.GroupBox mutationGroupBox;
    250     private System.Windows.Forms.Label multiplicativeChangeLabel;
    251     private System.Windows.Forms.TextBox multiplicativeChangeSigmaTextBox;
    252     private System.Windows.Forms.Label additiveChangeLabel;
    253     private System.Windows.Forms.TextBox additiveChangeSigmaTextBox;
    254 
     138    private System.Windows.Forms.Label valueLabel;
     139    private System.Windows.Forms.TextBox valueTextBox;
    255140  }
    256141}
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/ConstantView.cs

    r17180 r18180  
    4343      Content.Changed += new EventHandler(Content_Changed);
    4444    }
    45 
     45   
    4646    protected override void DeregisterContentEvents() {
    4747      base.DeregisterContentEvents();
     
    5656    protected override void SetEnabledStateOfControls() {
    5757      base.SetEnabledStateOfControls();
    58       minValueTextBox.Enabled = Content != null;
    59       minValueTextBox.ReadOnly = ReadOnly;
    60       maxValueTextBox.Enabled = Content != null;
    61       maxValueTextBox.ReadOnly = ReadOnly;
    62       additiveChangeSigmaTextBox.Enabled = Content != null;
    63       additiveChangeSigmaTextBox.ReadOnly = ReadOnly;
    64       multiplicativeChangeSigmaTextBox.Enabled = Content != null;
    65       multiplicativeChangeSigmaTextBox.ReadOnly = ReadOnly;
     58      valueTextBox.Enabled = Content != null;
     59      valueTextBox.ReadOnly = ReadOnly;
    6660    }
    6761
     
    7367
    7468    #region control event handlers
    75     private void minValueTextBox_TextChanged(object sender, EventArgs e) {
    76       double min;
    77       if (double.TryParse(minValueTextBox.Text, out min)) {
    78         Content.MinValue = min;
    79         errorProvider.SetError(minValueTextBox, string.Empty);
     69    private void valueTextBox_TextChanged(object sender, EventArgs e) {
     70      double val;
     71      if (double.TryParse(valueTextBox.Text, out val)) {
     72        Content.Value = val;
     73        errorProvider.SetError(valueTextBox, string.Empty);
    8074      } else {
    81         errorProvider.SetError(minValueTextBox, "Invalid value");
    82       }
    83     }
    84     private void maxValueTextBox_TextChanged(object sender, EventArgs e) {
    85       double max;
    86       if (double.TryParse(maxValueTextBox.Text, out max)) {
    87         Content.MaxValue = max;
    88         errorProvider.SetError(maxValueTextBox, string.Empty);
    89       } else {
    90         errorProvider.SetError(maxValueTextBox, "Invalid value");
    91       }
    92     }
    93 
    94     private void additiveChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
    95       double sigma;
    96       if (double.TryParse(additiveChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    97         Content.ManipulatorSigma = sigma;
    98         errorProvider.SetError(additiveChangeSigmaTextBox, string.Empty);
    99       } else {
    100         errorProvider.SetError(additiveChangeSigmaTextBox, "Invalid value");
    101       }
    102     }
    103 
    104     private void multiplicativeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
    105       double sigma;
    106       if (double.TryParse(multiplicativeChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    107         Content.MultiplicativeManipulatorSigma = sigma;
    108         errorProvider.SetError(multiplicativeChangeSigmaTextBox, string.Empty);
    109       } else {
    110         errorProvider.SetError(multiplicativeChangeSigmaTextBox, "Invalid value");
     75        errorProvider.SetError(valueTextBox, "Invalid value");
    11176      }
    11277    }
     
    11681    private void UpdateControl() {
    11782      if (Content == null) {
    118         minValueTextBox.Text = string.Empty;
    119         maxValueTextBox.Text = string.Empty;
    120         minValueTextBox.Text = string.Empty;
    121         multiplicativeChangeSigmaTextBox.Text = string.Empty;
    122         additiveChangeSigmaTextBox.Text = string.Empty;
     83        valueTextBox.Text = string.Empty;
    12384      } else {
    124         minValueTextBox.Text = Content.MinValue.ToString();
    125         maxValueTextBox.Text = Content.MaxValue.ToString();
    126         additiveChangeSigmaTextBox.Text = Content.ManipulatorSigma.ToString();
    127         multiplicativeChangeSigmaTextBox.Text = Content.MultiplicativeManipulatorSigma.ToString();
     85        valueTextBox.Text = Content.Value.ToString("g17");
    12886      }
    12987      SetEnabledStateOfControls();
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.Designer.cs

    r17180 r18180  
    2121
    2222namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
    23   partial class ConstantNodeEditDialog {
     23  partial class NumberNodeEditDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    121121      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
    122122      //
    123       // ConstantNodeEditDialog
     123      // NumberNodeEditDialog
    124124      //
    125125      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    138138      this.MaximizeBox = false;
    139139      this.MinimizeBox = false;
    140       this.Name = "ConstantNodeEditDialog";
     140      this.Name = "NumberNodeEditDialog";
    141141      this.ShowIcon = false;
    142142      this.ShowInTaskbar = false;
    143143      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    144       this.Text = "Edit constant value";
    145       this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConstantNodeEditDialog_KeyDown);
     144      this.Text = "Edit number value";
     145      this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.NumberNodeEditDialog_KeyDown);
    146146      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    147147      this.ResumeLayout(false);
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeConstantNodeEditDialog.cs

    r17180 r18180  
    2828
    2929namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
    30   public partial class ConstantNodeEditDialog : Form {
    31     private ConstantTreeNode constantTreeNode;
    32     public ConstantTreeNode NewNode {
    33       get { return constantTreeNode; }
     30  public partial class NumberNodeEditDialog : Form {
     31    private NumberTreeNode numberTreeNode;
     32    public NumberTreeNode NewNode {
     33      get { return numberTreeNode; }
    3434      set {
    3535        if (InvokeRequired)
    36           Invoke(new Action<SymbolicExpressionTreeNode>(x => constantTreeNode = (ConstantTreeNode)x), value);
     36          Invoke(new Action<SymbolicExpressionTreeNode>(x => numberTreeNode = (NumberTreeNode)x), value);
    3737        else
    38           constantTreeNode = value;
     38          numberTreeNode = value;
    3939      }
    4040    }
    4141
    42     public ConstantNodeEditDialog(ISymbolicExpressionTreeNode node) {
     42    public NumberNodeEditDialog(ISymbolicExpressionTreeNode node) {
    4343      InitializeComponent();
    4444      oldValueTextBox.TabStop = false; // cannot receive focus using tab key
    45       NewNode = (ConstantTreeNode)node;
     45      NewNode = (NumberTreeNode)node;
    4646      InitializeFields();
    4747    }
     
    4949    private void InitializeFields() {
    5050      if (NewNode == null)
    51         throw new ArgumentException("Node is not a constant.");
     51        throw new ArgumentException("Node is not a number.");
    5252      else {
    53         this.Text = "Edit constant";
    54         newValueTextBox.Text = oldValueTextBox.Text = Math.Round(constantTreeNode.Value, 4).ToString();
     53        this.Text = "Edit number";
     54        newValueTextBox.Text = oldValueTextBox.Text = Math.Round(numberTreeNode.Value, 4).ToString();
    5555      }
    5656    }
     
    7171
    7272    private static bool ValidateNewValue(string value, out string errorMessage) {
    73       double val;
    74       bool valid = double.TryParse(value, out val);
     73      bool valid = double.TryParse(value, out _);
    7574      errorMessage = string.Empty;
    7675      if (!valid) {
     
    8786    // proxy handler passing key strokes to the parent control
    8887    private void childControl_KeyDown(object sender, KeyEventArgs e) {
    89       ConstantNodeEditDialog_KeyDown(sender, e);
     88      NumberNodeEditDialog_KeyDown(sender, e);
    9089    }
    9190
    92     private void ConstantNodeEditDialog_KeyDown(object sender, KeyEventArgs e) {
     91    private void NumberNodeEditDialog_KeyDown(object sender, KeyEventArgs e) {
    9392      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
    9493        if (!ValidateChildren()) return;
     
    10099    public event EventHandler DialogValidated;
    101100    private void OnDialogValidated(object sender, EventArgs e) {
    102       if (constantTreeNode == null) return;
     101      if (numberTreeNode == null) return;
    103102      var value = double.Parse(newValueTextBox.Text);
    104103      // we impose an extra validation condition: that the new value is different from the original value
    105       if (constantTreeNode.Value.Equals(value)) return;
    106 
    107       constantTreeNode.Value = value;
     104      if (numberTreeNode.Value.Equals(value)) return;
     105      numberTreeNode.Value = value;
    108106      DialogResult = DialogResult.OK;
    109107      var dialogValidated = DialogValidated;
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.Designer.cs

    r17180 r18180  
    5252      this.variableNamesCombo = new System.Windows.Forms.ComboBox();
    5353      this.variableWeightTextBox = new System.Windows.Forms.TextBox();
    54       this.constantValueTextBox = new System.Windows.Forms.TextBox();
    55       this.constantValueLabel = new System.Windows.Forms.Label();
     54      this.numberValueTextBox = new System.Windows.Forms.TextBox();
     55      this.numberValueLabel = new System.Windows.Forms.Label();
    5656      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    5757      this.okButton = new System.Windows.Forms.Button();
     
    121121      this.variableWeightTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.variableWeightTextBox_Validating);
    122122      //
    123       // constantValueTextBox
    124       //
    125       this.constantValueTextBox.Location = new System.Drawing.Point(101, 37);
    126       this.constantValueTextBox.Name = "constantValueTextBox";
    127       this.constantValueTextBox.Size = new System.Drawing.Size(127, 20);
    128       this.constantValueTextBox.TabIndex = 7;
    129       this.constantValueTextBox.Text = "0.0";
    130       this.constantValueTextBox.Visible = false;
    131       this.constantValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.constantValueTextBox_Validating);
    132       //
    133       // constantValueLabel
    134       //
    135       this.constantValueLabel.AutoSize = true;
    136       this.constantValueLabel.Location = new System.Drawing.Point(19, 40);
    137       this.constantValueLabel.Name = "constantValueLabel";
    138       this.constantValueLabel.Size = new System.Drawing.Size(34, 13);
    139       this.constantValueLabel.TabIndex = 8;
    140       this.constantValueLabel.Text = "Value";
    141       this.constantValueLabel.Visible = false;
     123      // numberValueTextBox
     124      //
     125      this.numberValueTextBox.Location = new System.Drawing.Point(101, 37);
     126      this.numberValueTextBox.Name = "numberValueTextBox";
     127      this.numberValueTextBox.Size = new System.Drawing.Size(127, 20);
     128      this.numberValueTextBox.TabIndex = 7;
     129      this.numberValueTextBox.Text = "0.0";
     130      this.numberValueTextBox.Visible = false;
     131      this.numberValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.numberValueTextBox_Validating);
     132      //
     133      // numberValueLabel
     134      //
     135      this.numberValueLabel.AutoSize = true;
     136      this.numberValueLabel.Location = new System.Drawing.Point(19, 40);
     137      this.numberValueLabel.Name = "numberValueLabel";
     138      this.numberValueLabel.Size = new System.Drawing.Size(34, 13);
     139      this.numberValueLabel.TabIndex = 8;
     140      this.numberValueLabel.Text = "Value";
     141      this.numberValueLabel.Visible = false;
    142142      //
    143143      // errorProvider
     
    187187      this.Controls.Add(this.cancelButton);
    188188      this.Controls.Add(this.okButton);
    189       this.Controls.Add(this.constantValueLabel);
    190       this.Controls.Add(this.constantValueTextBox);
     189      this.Controls.Add(this.numberValueLabel);
     190      this.Controls.Add(this.numberValueTextBox);
    191191      this.Controls.Add(this.variableWeightTextBox);
    192192      this.Controls.Add(this.variableNamesCombo);
     
    211211    private System.Windows.Forms.Label variableWeightLabel;
    212212    private System.Windows.Forms.Label variableNameLabel;
    213     private System.Windows.Forms.Label constantValueLabel;
     213    private System.Windows.Forms.Label numberValueLabel;
    214214    private System.Windows.Forms.ErrorProvider errorProvider;
    215     internal System.Windows.Forms.TextBox constantValueTextBox;
     215    internal System.Windows.Forms.TextBox numberValueTextBox;
    216216    internal System.Windows.Forms.TextBox variableWeightTextBox;
    217217    internal System.Windows.Forms.ComboBox variableNamesCombo;
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs

    r17180 r18180  
    5757      var combo = (ComboBox)sender;
    5858      var symbol = combo.Items[combo.SelectedIndex];
    59       if (symbol is Constant) {
    60         // add controls to the dialog for changing the constant value
     59      if (symbol is Number) {
     60        // add controls to the dialog for changing the number value
    6161        variableNameLabel.Visible = false;
    6262        variableNamesCombo.Visible = false;
    6363        variableWeightLabel.Visible = false;
    6464        variableWeightTextBox.Visible = false;
    65         constantValueLabel.Visible = true;
    66         constantValueTextBox.Visible = true;
     65        numberValueLabel.Visible = true;
     66        numberValueTextBox.Visible = true;
    6767      } else if (symbol is VariableBase) {
    6868        var variableSymbol = (VariableBase)symbol;
     
    8080        variableWeightLabel.Visible = true;
    8181        variableWeightTextBox.Visible = true;
    82         constantValueLabel.Visible = false;
    83         constantValueTextBox.Visible = false;
     82        numberValueLabel.Visible = false;
     83        numberValueTextBox.Visible = false;
    8484        // add controls to the dialog for changing the variable name or weight
    8585      } else {
     
    8888        variableWeightLabel.Visible = false;
    8989        variableWeightTextBox.Visible = false;
    90         constantValueLabel.Visible = false;
    91         constantValueTextBox.Visible = false;
     90        numberValueLabel.Visible = false;
     91        numberValueTextBox.Visible = false;
    9292      }
    9393    }
     
    102102    }
    103103
    104     private void constantValueTextBox_Validating(object sender, CancelEventArgs e) {
     104    private void numberValueTextBox_Validating(object sender, CancelEventArgs e) {
    105105      string errorMessage;
    106       if (ValidateDoubleValue(constantValueTextBox.Text, out errorMessage)) return;
     106      if (ValidateDoubleValue(numberValueTextBox.Text, out errorMessage)) return;
    107107      e.Cancel = true;
    108       errorProvider.SetError(constantValueTextBox, errorMessage);
    109       constantValueTextBox.SelectAll();
     108      errorProvider.SetError(numberValueTextBox, errorMessage);
     109      numberValueTextBox.SelectAll();
    110110    }
    111111
  • branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeVariableNodeEditDialog.cs

    r17180 r18180  
    6060    private void InitializeFields() {
    6161      if (NewNode == null)
    62         throw new ArgumentException("Node is not a constant.");
     62        throw new ArgumentException("Node is not a variable node.");
    6363      else {
    6464        this.Text = "Edit variable";
Note: See TracChangeset for help on using the changeset viewer.