Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/26/16 00:02:05 (8 years ago)
Author:
abeham
Message:

#2457: worked on recommendation algorithms (x-validation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/Recommenders/FixedRankModel.cs

    r13791 r13794  
    2121
    2222using HeuristicLab.Optimization;
    23 using System;
    2423using System.Collections.Generic;
    2524
    2625namespace HeuristicLab.OptimizationExpertSystem.Common {
    2726  public class FixedRankModel : IRecommendationModel {
    28     private readonly List<Tuple<IAlgorithm, double>> ranking;
     27    private readonly List<KeyValuePair<IAlgorithm, double>> ranking;
    2928
    30     public FixedRankModel(IEnumerable<Tuple<IAlgorithm, double>> ranking) {
    31       this.ranking = new List<Tuple<IAlgorithm, double>>();
     29    public FixedRankModel(IEnumerable<KeyValuePair<IAlgorithm, double>> ranking) {
     30      this.ranking = new List<KeyValuePair<IAlgorithm, double>>();
    3231      foreach (var r in ranking) this.ranking.Add(r);
    3332    }
    3433 
    35     public IEnumerable<Tuple<IAlgorithm, double>> GetRanking(IRun problemInstance) {
     34    public IEnumerable<KeyValuePair<IAlgorithm, double>> GetRanking(IRun problemInstance) {
    3635      return ranking;
    3736    }
    3837
    3938    public static FixedRankModel GetEmpty() {
    40       return new FixedRankModel(new Tuple<IAlgorithm, double>[0]);
     39      return new FixedRankModel(new KeyValuePair<IAlgorithm, double>[0]);
    4140    }
    4241  }
Note: See TracChangeset for help on using the changeset viewer.