Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14992


Ignore:
Timestamp:
05/17/17 13:04:38 (7 years ago)
Author:
pfleck
Message:

#2713 Fixed a potential infinite loop that creates infinite datapoints.

File:
1 edited

Legend:

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

    r14987 r14992  
    579579      double min = row.Points.Min(p => p.X), max = row.Points.Max(p => p.X);
    580580      double range = max - min, delta = range / Math.Max(row.Points.Count - 1, 50);
    581       for (double x = min; x <= max; x += delta) {
    582         regressionSeries.Points.AddXY(x, Estimate(x, row, coefficients));
     581      if (range > double.Epsilon) {
     582        for (double x = min; x <= max; x += delta) {
     583          regressionSeries.Points.AddXY(x, Estimate(x, row, coefficients));
     584        }
    583585      }
    584586
Note: See TracChangeset for help on using the changeset viewer.