Changeset 12391 for branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Problems/FindPhrasesProblem.cs
- Timestamp:
- 05/12/15 20:40:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Problems/FindPhrasesProblem.cs
r12290 r12391 29 29 private readonly double decoyReward; 30 30 private readonly bool phrasesAsSets; 31 private readonly int alphabetSize; 32 private readonly int numOptimalPhrases; 33 private readonly int numDecoyPhrases; 31 34 private readonly SortedSet<string> optimalPhrases; 32 35 private readonly SortedSet<string> decoyPhrases; 33 public string Name { get { return "FindPhrases"; } }36 public string Name { get { return string.Format("FindPhrases({0},{1},{2},{3},{4},{5},{6},{7})", alphabetSize, numPhrases, phraseLen, numOptimalPhrases, numDecoyPhrases, correctReward, decoyReward, phrasesAsSets); } } 34 37 35 public FindPhrasesProblem( Random rand, int alphabetSize, int numPhrases, int phraseLen, int numOptimalPhrases, int numDecoyPhrases = 1,38 public FindPhrasesProblem(System.Random rand, int alphabetSize, int numPhrases, int phraseLen, int numOptimalPhrases, int numDecoyPhrases = 1, 36 39 double correctReward = 1.0, double decoyReward = 0.0, bool phrasesAsSets = false) { 37 40 if (alphabetSize <= 0 || alphabetSize > 26) throw new ArgumentException(); … … 47 50 this.decoyReward = decoyReward; 48 51 this.phrasesAsSets = phrasesAsSets; 52 this.alphabetSize = alphabetSize; 53 this.numOptimalPhrases = numOptimalPhrases; 54 this.numDecoyPhrases = numDecoyPhrases; 49 55 50 56 var sentenceSymbol = 'S';
Note: See TracChangeset
for help on using the changeset viewer.