Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/21/19 17:58:32 (4 years ago)
Author:
mkommend
Message:

#2521: First version of contexts in problem evaluation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs

    r17320 r17363  
    108108    }
    109109
     110    public override void Evaluate(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random, CancellationToken cancellationToken) {
     111      ProblemDefinition.Evaluate(solutionContext, random, cancellationToken);
     112    }
    110113    public override double Evaluate(TEncodedSolution individual, IRandom random, CancellationToken cancellationToken) {
    111114      return ProblemDefinition.Evaluate(individual, random, cancellationToken);
    112115    }
    113116
     117    public override void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, ResultCollection results, IRandom random) {
     118      ProblemDefinition.Analyze(solutionContexts, results, random);
     119    }
    114120    public override void Analyze(TEncodedSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) {
    115121      ProblemDefinition.Analyze(individuals, qualities, results, random);
     122    }
     123
     124    public override IEnumerable<ISingleObjectiveSolutionContext<TEncodedSolution>> GetNeighbors(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random) {
     125      return ProblemDefinition.GetNeighbors(solutionContext, random);
    116126    }
    117127    public override IEnumerable<TEncodedSolution> GetNeighbors(TEncodedSolution individual, IRandom random) {
Note: See TracChangeset for help on using the changeset viewer.