Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/20 13:53:11 (4 years ago)
Author:
mkommend
Message:

#2971: Added first draft of results implementation and problem adaptation.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3
Files:
3 edited

Legend:

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

    r17699 r17745  
    7474    }
    7575
    76     public virtual void Analyze(TEncodedSolution[] solutions, double[] qualities, ResultCollection results, IRandom random) { }
    77     public virtual void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, ResultCollection results, IRandom random) {
    78       var solutions = solutionContexts.Select(c => c.EncodedSolution).ToArray();
    79       var qualities = solutionContexts.Select(c => c.EvaluationResult.Quality).ToArray();
    80       Analyze(solutions, qualities, results, random);
    81     }
     76
     77    public virtual void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, IRandom random) { }
    8278
    8379    public virtual IEnumerable<TEncodedSolution> GetNeighbors(TEncodedSolution solutions, IRandom random) {
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemDefinitionScript.cs

    r17699 r17745  
    6666    }
    6767
    68     void ISingleObjectiveProblemDefinition<TEncoding, TEncodedSolution>.Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, ResultCollection results, IRandom random) {
    69       CompiledProblemDefinition.Analyze(solutionContexts, results, random);
     68    void ISingleObjectiveProblemDefinition<TEncoding, TEncodedSolution>.Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, IRandom random) {
     69      CompiledProblemDefinition.Analyze(solutionContexts, random);
    7070    }
    7171
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs

    r17699 r17745  
    115115    }
    116116
    117     public override void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, ResultCollection results, IRandom random) {
    118       ProblemDefinition.Analyze(solutionContexts, results, random);
     117    public override void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, IRandom random) {
     118      ProblemDefinition.Analyze(solutionContexts, random);
    119119    }
    120120
Note: See TracChangeset for help on using the changeset viewer.