- Timestamp:
- 05/03/11 16:40:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r5993 r6108 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 30 30 using HeuristicLab.MainForm.WindowsForms; 31 using HeuristicLab.Problems.DataAnalysis.Symbolic;32 31 33 32 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views { … … 131 130 // only allow to replace nodes for which a replacement value is known (replacement value for ADF nodes are not available) 132 131 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;135 132 SwitchNodeWithReplacementNode(treeNode, i); 136 133 … … 140 137 else 141 138 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); 149 141 return; // break all loops 150 142 } … … 191 183 visualTree.ToolTip += Environment.NewLine + "Replacement value: " + constantReplacementNode.Value; 192 184 } 193 } 185 } 194 186 } 195 187 this.PaintCollapsedNodes();
Note: See TracChangeset
for help on using the changeset viewer.