Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/01/10 17:58:03 (15 years ago)
Author:
gkronber
Message:

Worked on support vector regression operators and views. #1009

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs

    r3797 r3884  
    3939namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic {
    4040  [View("Simplified Symbolic Expression Model View")]
    41   [Content(typeof(SymbolicRegressionSolution))]
     41  [Content(typeof(SymbolicRegressionModel))]
    4242  public partial class SimplifiedSymbolicExpressionModelView : AsynchronousContentView {
    43     public new SymbolicRegressionSolution Content {
    44       get { return (SymbolicRegressionSolution)base.Content; }
    45       set { base.Content = value; }
    46     }
    47 
    48 
    4943    public SimplifiedSymbolicExpressionModelView()
    5044      : base() {
     
    5246    }
    5347
    54     protected override void RegisterContentEvents() {
    55       base.RegisterContentEvents();
    56       Content.ModelChanged += new EventHandler(Content_ModelChanged);
    57     }
    58 
    59     protected override void DeregisterContentEvents() {
    60       base.DeregisterContentEvents();
    61       Content.ModelChanged -= new EventHandler(Content_ModelChanged);
    62     }
    63 
    64     void Content_ModelChanged(object sender, EventArgs e) {
    65       UpdateTreeChart();
     48    public new SymbolicRegressionModel Content {
     49      get { return (SymbolicRegressionModel)base.Content; }
     50      set { base.Content = value; }
    6651    }
    6752
    6853    protected override void OnContentChanged() {
    6954      base.OnContentChanged();
    70       UpdateTreeChart();
     55      if (Content != null)
     56        UpdateTreeChart();
     57      else
     58        viewHost.Content = null;
    7159    }
    7260
    7361    private void UpdateTreeChart() {
    7462      var simplifier = new SymbolicSimplifier();
    75       var simplifiedTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
     63      var simplifiedTree = simplifier.Simplify(Content.SymbolicExpressionTree);
    7664      viewHost.Content = simplifiedTree;
    7765    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs

    r3797 r3884  
    3939namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic {
    4040  [View("Symbolic Expression Model View")]
    41   [Content(typeof(SymbolicRegressionSolution))]
     41  [Content(typeof(SymbolicRegressionModel),true)]
    4242  public partial class SymbolicExpressionModelView : AsynchronousContentView {
    43     public new SymbolicRegressionSolution Content {
    44       get { return (SymbolicRegressionSolution)base.Content; }
    45       set { base.Content = value; }
    46     }
    47 
    4843    public SymbolicExpressionModelView()
    4944      : base() {
     
    5146    }
    5247
    53     protected override void RegisterContentEvents() {
    54       base.RegisterContentEvents();
    55       Content.ModelChanged += new EventHandler(Content_ModelChanged);
    56     }
    57 
    58     protected override void DeregisterContentEvents() {
    59       base.DeregisterContentEvents();
    60       Content.ModelChanged -= new EventHandler(Content_ModelChanged);
    61     }
    62 
    63     void Content_ModelChanged(object sender, EventArgs e) {
    64       UpdateTreeChart();
     48    public new SymbolicRegressionModel Content {
     49      get { return (SymbolicRegressionModel)base.Content; }
     50      set { base.Content = value; }
    6551    }
    6652
    6753    protected override void OnContentChanged() {
    6854      base.OnContentChanged();
    69       UpdateTreeChart();
     55      if (Content != null)
     56        UpdateTreeChart();
     57      else
     58        viewHost.Content = null;
    7059    }
    7160
    7261    private void UpdateTreeChart() {
    73       viewHost.Content = Content.Model.SymbolicExpressionTree;
     62      viewHost.Content = Content.SymbolicExpressionTree;
    7463    }
    7564  }
Note: See TracChangeset for help on using the changeset viewer.