Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13307


Ignore:
Timestamp:
11/19/15 17:31:44 (9 years ago)
Author:
gkronber
Message:

#2175: fixed a typo while reviewing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r13241 r13307  
    114114      bool[] maximization = Maximization.ToArray();
    115115
    116       var nonDominatedInvididuals = new[] { new { Tree = default(ISymbolicExpressionTree), Qualities = default(double[]) } }.ToList();
    117       nonDominatedInvididuals.Clear();
     116      var nonDominatedIndividuals = new[] { new { Tree = default(ISymbolicExpressionTree), Qualities = default(double[]) } }.ToList();
     117      nonDominatedIndividuals.Clear();
    118118
    119119      // build list of new non-dominated solutions
    120120      for (int i = 0; i < trees.Length; i++) {
    121         if (IsNonDominated(qualities[i], nonDominatedInvididuals.Select(ind => ind.Qualities), maximization) &&
     121        if (IsNonDominated(qualities[i], nonDominatedIndividuals.Select(ind => ind.Qualities), maximization) &&
    122122            IsNonDominated(qualities[i], trainingBestQualities, maximization)) {
    123           for (int j = nonDominatedInvididuals.Count - 1; j >= 0; j--) {
    124             if (IsBetterOrEqual(qualities[i], nonDominatedInvididuals[j].Qualities, maximization)) {
    125               nonDominatedInvididuals.RemoveAt(j);
     123          for (int j = nonDominatedIndividuals.Count - 1; j >= 0; j--) {
     124            if (IsBetterOrEqual(qualities[i], nonDominatedIndividuals[j].Qualities, maximization)) {
     125              nonDominatedIndividuals.RemoveAt(j);
    126126            }
    127127          }
    128           nonDominatedInvididuals.Add(new { Tree = trees[i], Qualities = qualities[i] });
     128          nonDominatedIndividuals.Add(new { Tree = trees[i], Qualities = qualities[i] });
    129129        }
    130130      }
    131131
    132       var nonDominatedSolutions = nonDominatedInvididuals.Select(x => new { Solution = CreateSolution(x.Tree, x.Qualities), Qualities = x.Qualities }).ToList();
     132      var nonDominatedSolutions = nonDominatedIndividuals.Select(x => new { Solution = CreateSolution(x.Tree, x.Qualities), Qualities = x.Qualities }).ToList();
    133133      nonDominatedSolutions.ForEach(s => s.Solution.Name = string.Join(",", s.Qualities.Select(q => q.ToString())));
    134134
Note: See TracChangeset for help on using the changeset viewer.