Changeset 17363 for branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces
- Timestamp:
- 11/21/19 17:58:32 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveProblemDefinition.cs
r17320 r17363 39 39 double Evaluate(TEncodedSolution solution, IRandom random); 40 40 double Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken); 41 void Evaluate(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random); 42 void Evaluate(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random, CancellationToken cancellationToken); 41 43 42 44 void Analyze(TEncodedSolution[] solutions, double[] qualities, ResultCollection results, IRandom random); 45 void Analyze(ISingleObjectiveSolutionContext<TEncodedSolution>[] solutionContexts, ResultCollection results, IRandom random); 46 43 47 IEnumerable<TEncodedSolution> GetNeighbors(TEncodedSolution solution, IRandom random); 48 IEnumerable<ISingleObjectiveSolutionContext<TEncodedSolution>> GetNeighbors(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random); 44 49 } 45 50 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISolutionContext.cs
r17357 r17363 24 24 25 25 namespace HeuristicLab.Optimization { 26 //TODO discuss renaming to solution scope? 26 27 [StorableType("383A35EB-03C9-473D-A20B-EE34E00BC174")] 27 28 public interface ISolutionContext : IItem { … … 36 37 } 37 38 38 public interface IS ingleObjectiveSolutionContext : ISolutionContext {39 //TODO discuss with abeham hiding of base property40 new ISingleObjectiveEvaluationResult EvaluationResult{ get; }39 public interface ISolutionContext<TEncodedSolution> : ISolutionContext 40 where TEncodedSolution : class, IEncodedSolution { 41 new TEncodedSolution EncodedSolution { get; } 41 42 } 42 43 43 public interface IMultiObjectiveSolutionContext : ISolutionContext { 44 new IMultiObjectiveEvaluationResult EvaluationResult { get; } 44 45 public interface ISingleObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution> 46 where TEncodedSolution : class, IEncodedSolution { 47 //TODO discuss with abeham hiding of base property 48 new ISingleObjectiveEvaluationResult EvaluationResult { get; set; } 49 } 50 51 public interface IMultiObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution> 52 where TEncodedSolution : class, IEncodedSolution { 53 new IMultiObjectiveEvaluationResult EvaluationResult { get; set; } 45 54 } 46 55 -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/INeighborBasedOperator.cs
r17226 r17363 29 29 internal interface INeighborBasedOperator<TEncodedSolution> : IEncodingOperator<TEncodedSolution> 30 30 where TEncodedSolution : class, IEncodedSolution { 31 Func< TEncodedSolution, IRandom, IEnumerable<TEncodedSolution>> GetNeighborsFunc{ get; set; }31 Func<ISingleObjectiveSolutionContext<TEncodedSolution>, IRandom, IEnumerable<ISingleObjectiveSolutionContext<TEncodedSolution>>> GetNeighbors { get; set; } 32 32 } 33 33 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/ISingleObjectiveAnalysisOperator.cs
r17226 r17363 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 using HeuristicLab.Core; 24 using HEAL.Attic;25 25 26 26 namespace HeuristicLab.Optimization { … … 28 28 internal interface ISingleObjectiveAnalysisOperator<TEncodedSolution> : IEncodingOperator<TEncodedSolution>, ISingleObjectiveOperator 29 29 where TEncodedSolution : class, IEncodedSolution { 30 Action< TEncodedSolution[], double[], ResultCollection, IRandom> AnalyzeAction{ get; set; }30 Action<ISingleObjectiveSolutionContext<TEncodedSolution>[], ResultCollection, IRandom> Analyze { get; set; } 31 31 } 32 32 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/internal/ISingleObjectiveEvaluationOperator.cs
r17226 r17363 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 using HeuristicLab.Core; 24 using HEAL.Attic;25 25 26 26 namespace HeuristicLab.Optimization { … … 28 28 internal interface ISingleObjectiveEvaluationOperator<TEncodedSolution> : ISingleObjectiveEvaluator, IEncodingOperator<TEncodedSolution> 29 29 where TEncodedSolution : class, IEncodedSolution { 30 Func<TEncodedSolution, IRandom, double> EvaluateFunc{ get; set; }30 Action<ISingleObjectiveSolutionContext<TEncodedSolution>, IRandom> Evaluate { get; set; } 31 31 } 32 32 }
Note: See TracChangeset
for help on using the changeset viewer.