Free cookie consent management tool by TermsFeed Policy Generator

source: branches/CEDMA-Exporter-715/sources/HeuristicLab.Visualization/3.2/LabelProvider/DiscreteLabelProvider.cs @ 3199

Last change on this file since 3199 was 1996, checked in by mstoeger, 15 years ago

implemented IStorable and made use of the PersistenceManager wherever possible. #639

File size: 419 bytes
Line 
1using System;
2using HeuristicLab.Core;
3
4namespace HeuristicLab.Visualization.LabelProvider {
5  public class DiscreteLabelProvider : StorableBase, ILabelProvider {
6    public string GetLabel(double value) {
7      int index = (int)Math.Round(value);
8      double delta = Math.Abs(index - value);
9
10      if (delta < 1e-10)
11        return index.ToString();
12      else
13        return string.Empty;
14    }
15  }
16}
Note: See TracBrowser for help on using the repository browser.