Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3901


Ignore:
Timestamp:
06/07/10 14:54:55 (14 years ago)
Author:
abeham
Message:

#1032

  • Added check for maximization or minimization problem when sorting qualities
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/BestScopeSolutionAnalyzer.cs

    r3872 r3901  
    7171      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
    7272
    73       int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
     73      int i = -1;
     74      if (!max)
     75        i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
     76      else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
    7477     
    7578      IEnumerable<IScope> scopes = new IScope[] { ExecutionContext.Scope };
Note: See TracChangeset for help on using the changeset viewer.