Changeset 14802 for stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14432,14494,14706
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views merged: 14432,14494,14706
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r14186 r14802 112 112 treeChart.Tree = tree; 113 113 treeChart.Repaint(); 114 bool valid = !tree.IterateNodesPostfix().Any(node => node.SubtreeCount < GetMinArity(node.Symbol) || node.SubtreeCount > node.Symbol.MaximumArity); 114 // check if all nodes have a legal arity 115 var nodes = tree.IterateNodesPostfix().ToList(); 116 bool valid = !nodes.Any(node => node.SubtreeCount < GetMinArity(node.Symbol) || node.SubtreeCount > node.Symbol.MaximumArity); 117 118 if (valid) { 119 // check if all variables are contained in the dataset 120 var variables = new HashSet<string>(Content.ProblemData.Dataset.DoubleVariables); 121 valid = nodes.OfType<VariableTreeNode>().All(x => variables.Contains(x.VariableName)); 122 } 123 115 124 if (valid) { 116 125 btnOptimizeConstants.Enabled = true;
Note: See TracChangeset
for help on using the changeset viewer.