Last change
on this file since 2215 was
1996,
checked in by mstoeger, 16 years ago
|
implemented IStorable and made use of the PersistenceManager wherever possible. #639
|
File size:
419 bytes
|
Rev | Line | |
---|
[1194] | 1 | using System;
|
---|
[1996] | 2 | using HeuristicLab.Core;
|
---|
[1194] | 3 |
|
---|
| 4 | namespace HeuristicLab.Visualization.LabelProvider {
|
---|
[1996] | 5 | public class DiscreteLabelProvider : StorableBase, ILabelProvider {
|
---|
[1194] | 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.