Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8734 for trunk


Ignore:
Timestamp:
10/04/12 12:58:00 (12 years ago)
Author:
gkronber
Message:

#1890: fixed a bug in the ValueGenerator for data analysis benchmark instances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ValueGenerator.cs

    r8224 r8734  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
     
    4041      if (stepWidth <= 0) throw new ArgumentException("stepwith must be larger than zero.", "stepWidth");
    4142      double x = start;
    42       while (x <= end) {
     43      // x<=end could skip the last value because of numerical problems
     44      while (x < end || x.IsAlmost(end)) {
    4345        yield return x;
    4446        x += stepWidth;
Note: See TracChangeset for help on using the changeset viewer.