- Timestamp:
- 12/16/16 14:38:47 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r14400 r14494 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.