Ignore:
Timestamp:
02/20/14 20:37:55 (6 years ago)
Author:
bburlacu
Message:

#2156: Modified the InteractiveSymbolicDataAnalysisSolutionSimplifierView to use the unified method of calculating impact and replacement values.

File:
1 edited

Legend:

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

    r9478 r10492  
    7575      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
    7676
    77       var replacementValues = CalculateReplacementValues(tree);
     77      var impactAndReplacementValues = CalculateImpactAndReplacementValues(tree);
     78      nodeImpacts = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item1);
     79      var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2);
    7880      foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
    7981        foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
    8082      }
    81 
    82       nodeImpacts = CalculateImpactValues(tree);
    8383      PaintNodeImpacts();
    8484    }
     
    8686    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree);
    8787    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree);
     88    protected abstract Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>> CalculateImpactAndReplacementValues(ISymbolicExpressionTree tree);
    8889    protected abstract void UpdateModel(ISymbolicExpressionTree tree);
    8990
Note: See TracChangeset for help on using the changeset viewer.