Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/17 09:40:13 (7 years ago)
Author:
abeham
Message:

#2783: merged r15051,r15080,r15086,r15087 to stable

Location:
stable
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization

  • stable/HeuristicLab.Optimization/3.3/MultiObjective/DominationCalculator.cs

    r15080 r15109  
    2222using System;
    2323using System.Collections.Generic;
    24 using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2624
    2725namespace HeuristicLab.Optimization {
     
    10098    }
    10199
    102     private static List<Tuple<T, double[]>> CalculateBestFront(T[] individuals, double[][] qualities, bool[] maximization, bool dominateOnEqualQualities, int populationSize, out Dictionary<T, List<int>> dominatedIndividuals, out int[] dominationCounter, out int[] rank) {
     100    private static List<Tuple<T, double[]>> CalculateBestFront(T[] solutions, double[][] qualities, bool[] maximization, bool dominateOnEqualQualities, int populationSize, out Dictionary<T, List<int>> dominatedIndividuals, out int[] dominationCounter, out int[] rank) {
    103101      var front = new List<Tuple<T, double[]>>();
    104102      dominatedIndividuals = new Dictionary<T, List<int>>();
     
    106104      rank = new int[populationSize];
    107105      for (int pI = 0; pI < populationSize - 1; pI++) {
    108         var p = individuals[pI];
     106        var p = solutions[pI];
    109107        List<int> dominatedIndividualsByp;
    110108        if (!dominatedIndividuals.TryGetValue(p, out dominatedIndividualsByp))
     
    117115          } else if (test == DominationResult.IsDominated) {
    118116            dominationCounter[pI] += 1;
    119             if (!dominatedIndividuals.ContainsKey(individuals[qI]))
    120               dominatedIndividuals.Add(individuals[qI], new List<int>());
    121             dominatedIndividuals[individuals[qI]].Add(pI);
     117            if (!dominatedIndividuals.ContainsKey(solutions[qI]))
     118              dominatedIndividuals.Add(solutions[qI], new List<int>());
     119            dominatedIndividuals[solutions[qI]].Add(pI);
    122120          }
    123121          if (pI == populationSize - 2
     
    125123            && dominationCounter[qI] == 0) {
    126124            rank[qI] = 0;
    127             front.Add(Tuple.Create(individuals[qI], qualities[qI]));
     125            front.Add(Tuple.Create(solutions[qI], qualities[qI]));
    128126          }
    129127        }
Note: See TracChangeset for help on using the changeset viewer.