Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4862 for trunk


Ignore:
Timestamp:
11/19/10 18:00:53 (14 years ago)
Author:
swagner
Message:

Checked if all solution similarities are between 0 and 1 (#1188).

File:
1 edited

Legend:

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

    r4848 r4862  
    2020#endregion
    2121
     22using System;
    2223using System.Linq;
    2324using HeuristicLab.Common;
     
    123124              if (i != j) {
    124125                similarity = similarities[i, j];
     126
     127                if ((similarity < 0) || (similarity > 1))
     128                  throw new InvalidOperationException("Solution similarities have to be in the interval [0;1].");
     129
    125130                if (minSimilarities[i] > similarity) minSimilarities[i] = similarity;
    126131                avgSimilarities[i] += similarity;
Note: See TracChangeset for help on using the changeset viewer.