Changeset 15806 for branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/Grammar.cs
- Timestamp:
- 02/22/18 13:46:16 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/Grammar.cs
r15803 r15806 204 204 for (int i = 0; i < isFactorRemaining.Length; i++) { 205 205 if (!isFactorRemaining[i]) continue; 206 if (isFactorRemaining.Count( b => b) <= 2) break; // Until we have constants, we can't cancel out all terms.206 if (isFactorRemaining.Count() <= 2) break; // Until we have constants, we can't cancel out all terms. 207 207 208 208 var currFactor = childHashes[i]; … … 241 241 } 242 242 243 return $"[{hashesArray.Aggregate(operatorSym.StringRepresentation, (result, ti) => string.Concat(result, " ° ", ti))}]"; 243 return $"[{hashesArray.Aggregate(operatorSym.StringRepresentation, (result, ti) => string.Concat(result, " ° ", ti))}]"; // TODO: use string join instead of string.Concat 244 244 } 245 245 … … 268 268 Debug.Assert(sentence.All(s => s is TerminalSymbol), "Trying to evaluate symbol sequence with nonterminalsymbols!"); 269 269 270 symbolicExpressionGrammar.ConfigureAsDefaultRegressionGrammar(); 270 symbolicExpressionGrammar.ConfigureAsDefaultRegressionGrammar(); // TODO: not necessary to call this for each sentence 271 271 272 272 var rootNode = rootSy.CreateTreeNode();
Note: See TracChangeset
for help on using the changeset viewer.