Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/08/10 03:43:36 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on parameters and operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/DoubleData.cs

    r2694 r2757  
    3131  [Item("DoubleData", "Represents a double value.")]
    3232  [Creatable("Test")]
    33   public sealed class DoubleData : ValueTypeData<double>, IStringConvertibleData {
     33  public sealed class DoubleData : ValueTypeData<double>, IComparable, IStringConvertibleData {
    3434    public DoubleData() : base() { }
    3535    public DoubleData(double value) : base(value) { }
     
    4343    public override string ToString() {
    4444      return Value.ToString("r");  // round-trip format
     45    }
     46
     47    public int CompareTo(object obj) {
     48      DoubleData other = obj as DoubleData;
     49      if (other != null)
     50        return Value.CompareTo(other.Value);
     51      else
     52        return Value.CompareTo(obj);
    4553    }
    4654
Note: See TracChangeset for help on using the changeset viewer.