Changeset 16547
- Timestamp:
- 01/23/19 11:32:42 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval.cs
r16412 r16547 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 28 27 29 namespace HeuristicLab.Problems.DataAnalysis { 28 public class Interval : IEquatable<Interval> { 30 [StorableClass] 31 public class Interval :Item, IEquatable<Interval> { 32 [Storable] 29 33 public double LowerBound { get; private set; } 34 [Storable] 30 35 public double UpperBound { get; private set; } 31 36 37 [StorableConstructor] 38 protected Interval(bool deserializing) : base(deserializing) { } 39 protected Interval(Interval original, Cloner cloner) 40 : base(original, cloner) { 41 } 32 42 public Interval(double lowerBound, double upperBound) { 33 43 if (lowerBound > upperBound) … … 40 50 public bool Contains(double value) { 41 51 return LowerBound <= value && value <= UpperBound; 52 } 53 54 public override IDeepCloneable Clone(Cloner cloner) { 55 return new Interval(this, cloner); 42 56 } 43 57
Note: See TracChangeset
for help on using the changeset viewer.