Changeset 11793 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/RoyalSymbolProblem.cs
- Timestamp:
- 01/18/15 18:24:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/RoyalSymbolProblem.cs
r11742 r11793 17 17 public RoyalSymbolProblem() { 18 18 this.grammar = new Grammar(grammarString); 19 //TODO: allow configuration of the number of symbols 19 20 } 20 21 … … 31 32 // sentence must contain only terminal symbols, we are not checking if the sentence is syntactically valid here because it would be too slow! 32 33 Debug.Assert(sentence.Any(c => grammar.IsTerminal(c))); 33 return regex.Matches(sentence ).Count;34 return regex.Matches(sentence.ToString()).Count; 34 35 } 35 36 public string CanonicalRepresentation(string terminalPhrase) { 37 throw new NotImplementedException(); 36 38 return terminalPhrase; 37 39 }
Note: See TracChangeset
for help on using the changeset viewer.