Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/11/14 12:07:15 (10 years ago)
Author:
gkronber
Message:

#2109: minor code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicRegressionSingleObjectiveProblem.cs

    r10968 r10974  
    3535namespace HeuristicLab.Problems.GrammaticalEvolution {
    3636  [Item("Grammatical Evolution Symbolic Regression Problem (single objective)",
    37         "Represents a single objective symbolic regression problem, implemented in Grammatical Evolution.")]
     37        "Represents grammatical evolution for single objective symbolic regression problems.")]
    3838  [StorableClass]
    3939  [Creatable("Problems")]
     
    7272
    7373      ApplyLinearScalingParameter.Value.Value = true;
    74       Maximization.Value = true;
     74      Maximization.Value = Evaluator.Maximization;
    7575      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
    7676
     
    8686
    8787    private void RegisterEventHandlers() {
    88       // nothing to do
     88      // when the ge evaluator itself changes
     89      EvaluatorParameter.ValueChanged += (sender, args) => {
     90        // register a new hander for the symbreg evaluator in the ge evaluator
     91        // hacky because we the evaluator does not have an event for changes of the maximization property
     92        EvaluatorParameter.Value.EvaluatorParameter.ValueChanged +=
     93          (_, __) => Maximization.Value = Evaluator.Maximization;
     94      };
     95      EvaluatorParameter.Value.EvaluatorParameter.ValueChanged +=
     96        (sender, args) => Maximization.Value = Evaluator.Maximization;
    8997    }
    9098
Note: See TracChangeset for help on using the changeset viewer.