Changeset 3915 for trunk/sources
- Timestamp:
- 06/11/10 13:06:42 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs
r3470 r3915 130 130 } 131 131 } 132 } 133 134 public VisualSymbolicExpressionTreeNode GetVisualSymbolicExpressionTreeNode(SymbolicExpressionTreeNode symbolicExpressionTreeNode) { 135 if (visualTreeNodes.ContainsKey(symbolicExpressionTreeNode)) 136 return visualTreeNodes[symbolicExpressionTreeNode]; 137 return null; 132 138 } 133 139 -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs
r3904 r3915 43 43 get { return content; } 44 44 set { 45 if ((value != null) && (!MainFormManager.ViewCanViewContent(this, value))) 45 //check if the ContentView is tagged with a corresponding ContentAttribute for the type of the Content 46 if ((value != null) && (!MainFormManager.ViewCanViewContent(this, value)) && 47 ContentAttribute.HasContentAttribute(this.GetType())) 46 48 throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name)); 47 49 if (InvokeRequired) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs
r3905 r3915 97 97 if (BestSolutionQualityParameter.ActualValue == null || BestSolutionQualityParameter.ActualValue.Value > Quality[i].Value) { 98 98 var model = new SymbolicRegressionModel((ISymbolicExpressionTreeInterpreter)SymbolicExpressionTreeInterpreter.Clone(), 99 SymbolicExpressionTree[i], 100 GetInputVariables(SymbolicExpressionTree[i])); 99 SymbolicExpressionTree[i]); 101 100 var solution = new SymbolicRegressionSolution(ProblemData, model, lowerEstimationLimit, upperEstimationLimit); 102 101 … … 134 133 } 135 134 136 private IEnumerable<string> GetInputVariables(SymbolicExpressionTree tree) {137 return (from varNode in tree.IterateNodesPrefix().OfType<VariableTreeNode>()138 select varNode.VariableName).Distinct();139 }140 135 } 141 136 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs
r3884 r3915 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing; 24 25 using System.Linq; 25 using System.Drawing;26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HeuristicLab.Operators; 29 31 using HeuristicLab.Optimization; 30 32 using HeuristicLab.Parameters; 31 33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 34 using HeuristicLab.PluginInfrastructure; 33 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;34 35 using HeuristicLab.Problems.DataAnalysis; 35 using HeuristicLab.Operators;36 36 using HeuristicLab.Problems.DataAnalysis.Symbolic; 37 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; 37 38 38 39 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic { … … 45 46 : base(deserializing) { 46 47 } 47 public SymbolicRegressionModel(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree tree , IEnumerable<string> inputVariables)48 public SymbolicRegressionModel(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree tree) 48 49 : base() { 49 50 this.tree = tree; 50 51 this.interpreter = interpreter; 51 this.inputVariables = inputVariables.ToList();52 this.inputVariables = tree.IterateNodesPrefix().OfType<VariableTreeNode>().Select(var => var.VariableName).Distinct().ToList(); 52 53 } 53 54 … … 66 67 public IEnumerable<string> InputVariables { 67 68 get { return inputVariables.AsEnumerable(); } 68 set {69 if (value != null)70 inputVariables = new List<string>(value);71 }72 69 } 73 70 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisSolutionView.cs
r3904 r3915 56 56 protected override void RegisterContentEvents() { 57 57 base.RegisterContentEvents(); 58 Content.ModelChanged += new EventHandler(Content_ModelChanged); 58 59 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 59 60 } 61 60 62 protected override void DeregisterContentEvents() { 61 63 base.DeregisterContentEvents(); 64 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 62 65 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 66 } 67 68 private void Content_ModelChanged(object sender, EventArgs e) { 69 modelViewHost.Content = Content.Model; 63 70 } 64 71 private void Content_ProblemDataChanged(object sender, EventArgs e) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLab.Problems.DataAnalysis.Views-3.3.csproj
r3902 r3915 130 130 <DependentUpon>ScatterPlotView.cs</DependentUpon> 131 131 </Compile> 132 <Compile Include="Symbolic\InteractiveSymbolicRegressionSolutionSimplifierView.cs"> 133 <SubType>UserControl</SubType> 134 </Compile> 135 <Compile Include="Symbolic\InteractiveSymbolicRegressionSolutionSimplifierView.Designer.cs"> 136 <DependentUpon>InteractiveSymbolicRegressionSolutionSimplifierView.cs</DependentUpon> 137 </Compile> 132 138 <Compile Include="Symbolic\SimplifiedSymbolicExpressionModelView.cs"> 133 139 <SubType>UserControl</SubType> … … 141 147 <Compile Include="Symbolic\SymbolicExpressionModelView.designer.cs"> 142 148 <DependentUpon>SymbolicExpressionModelView.cs</DependentUpon> 149 </Compile> 150 <Compile Include="Symbolic\SymbolicRegressionSolutionView.cs"> 151 <SubType>UserControl</SubType> 152 </Compile> 153 <Compile Include="Symbolic\SymbolicRegressionSolutionView.Designer.cs"> 154 <DependentUpon>SymbolicRegressionSolutionView.cs</DependentUpon> 143 155 </Compile> 144 156 <Compile Include="Symbolic\Symbols\ConstantView.cs"> … … 199 211 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project> 200 212 <Name>HeuristicLab.Operators-3.3</Name> 213 </ProjectReference> 214 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 215 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 216 <Name>HeuristicLab.Optimization-3.3</Name> 201 217 </ProjectReference> 202 218 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLabProblemsDataAnalysisViewsPlugin.cs.frame
r3651 r3915 39 39 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3.0.0")] 40 40 [PluginDependency("HeuristicLab.Operators", "3.3.0.0")] 41 [PluginDependency("HeuristicLab.Optimization", "3.3.0.0")] 41 42 [PluginDependency("HeuristicLab.Parameters", "3.3.0.0")] 42 43 [PluginDependency("HeuristicLab.Persistence", "3.3.0.0")] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.Designer.cs
r3908 r3915 20 20 #endregion 21 21 22 namespace HeuristicLab.Problems.DataAnalysis. Symbolic.Symbols.Views {22 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols { 23 23 partial class ConstantView { 24 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs
r3908 r3915 35 35 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 36 36 37 namespace HeuristicLab.Problems.DataAnalysis. Symbolic.Symbols.Views {37 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols { 38 38 [View("Constant View")] 39 39 [Content(typeof(Constant), true)] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.Designer.cs
r3908 r3915 20 20 #endregion 21 21 22 namespace HeuristicLab.Problems.DataAnalysis. Symbolic.Symbols.Views {22 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols { 23 23 partial class VariableView { 24 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs
r3908 r3915 35 35 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 36 36 37 namespace HeuristicLab.Problems.DataAnalysis. Symbolic.Symbols.Views {37 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols { 38 38 [View("Variable View")] 39 39 [Content(typeof(Variable), true)] -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs
r3884 r3915 69 69 RegisterProblemDataEvents(); 70 70 OnProblemDataChanged(); 71 RecalculateEstimatedValues(); 71 72 } 72 73 } … … 82 83 model = value; 83 84 OnModelChanged(); 85 RecalculateEstimatedValues(); 84 86 } 85 87 } … … 128 130 public event EventHandler ProblemDataChanged; 129 131 protected virtual void OnProblemDataChanged() { 130 RecalculateEstimatedValues();131 132 var listeners = ProblemDataChanged; 132 133 if (listeners != null) … … 136 137 public event EventHandler ModelChanged; 137 138 protected virtual void OnModelChanged() { 138 RecalculateEstimatedValues();139 139 EventHandler handler = ModelChanged; 140 140 if (handler != null)
Note: See TracChangeset
for help on using the changeset viewer.