Changeset 11857 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/GenericSymbExprProblem.cs
- Timestamp:
- 02/02/15 13:37:38 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 *.user
-
- Property svn:ignore
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/GenericSymbExprProblem.cs
r11849 r11857 18 18 [StorableClass] 19 19 [Item("GenericSymbExprProblem", "Represents grammatical optimization problems (using a symbolic expression tree encoding).")] 20 public class GenericSymbExprProblem : SingleObjectiveHeuristicOptimizationProblem<IG rammaticalOptimizationEvaluator, ISymbolicExpressionTreeCreator> {20 public class GenericSymbExprProblem : SingleObjectiveHeuristicOptimizationProblem<IGenericSymbExprEvaluator, ISymbolicExpressionTreeCreator> { 21 21 #region string consts 22 22 private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar"; … … 51 51 get { return MaximumSymbolicExpressionTreeLengthParameter.Value; } 52 52 } 53 public new G rammaticalOptimizationEvaluator Evaluator {54 get { return (G rammaticalOptimizationEvaluator)base.Evaluator; }53 public new GenericSymbExprEvaluator Evaluator { 54 get { return (GenericSymbExprEvaluator)base.Evaluator; } 55 55 } 56 56 … … 62 62 63 63 public GenericSymbExprProblem(ISymbolicExpressionTreeProblem problem) 64 : base(new GrammaticalOptimizationEvaluator(problem.ConvertTreeToSentence, problem.Evaluate), new ProbabilisticTreeCreator()) { 65 Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, problem.SymbolicExpressionGrammar)); 64 : base(new GenericSymbExprEvaluator(problem.ConvertTreeToSentence, problem.Evaluate), new ProbabilisticTreeCreator()) { 65 var grammar = new GenericSymbExprGrammar(problem.TreeBasedGPGrammar); 66 Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, grammar)); 66 67 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue(50))); 67 68 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue(15)));
Note: See TracChangeset
for help on using the changeset viewer.