Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6108


Ignore:
Timestamp:
05/03/11 16:40:55 (14 years ago)
Author:
mkommend
Message:

#1504: Corrected bug in symbolic simplifier view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r5993 r6108  
    2929using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
    3030using HeuristicLab.MainForm.WindowsForms;
    31 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3231
    3332namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
     
    131130          // only allow to replace nodes for which a replacement value is known (replacement value for ADF nodes are not available)
    132131          if (subTree == visualTreeNode.SymbolicExpressionTreeNode && replacementNodes.ContainsKey(subTree)) {
    133             double replacementImpact = nodeImpacts.ContainsKey(replacementNodes[subTree]) ? nodeImpacts[replacementNodes[subTree]] : 0.0;
    134             double originalImpact = nodeImpacts.ContainsKey(subTree) ? nodeImpacts[subTree] : 0.0;
    135132            SwitchNodeWithReplacementNode(treeNode, i);
    136133
     
    140137            else
    141138              this.treeChart.Tree = new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0)); // 1st child of RPB
    142             if (!(originalImpact.IsAlmost(0.0) && replacementImpact.IsAlmost(0.0))) {
    143               // update everything after the change if necessary (impact != 0)           
    144               UpdateModel(tree);
    145             } else {
    146               // both impacts are zero, so we only need to repaint the nodes
    147               PaintNodeImpacts();
    148             }
     139
     140            UpdateModel(tree);
    149141            return; // break all loops
    150142          }
     
    191183            visualTree.ToolTip += Environment.NewLine + "Replacement value: " + constantReplacementNode.Value;
    192184          }
    193         } 
     185        }
    194186      }
    195187      this.PaintCollapsedNodes();
Note: See TracChangeset for help on using the changeset viewer.