Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/25/19 13:39:43 (4 years ago)
Author:
chaider
Message:

#2971 Removed the possibility of declaring open and closed intervals. All intervals are closed intervals now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraint.cs

    r16964 r17370  
    9898
    9999    [Storable]
    100     private bool inclusiveLowerBound;
    101     public bool InclusiveLowerBound {
    102       get => inclusiveLowerBound;
    103       set {
    104         if (inclusiveLowerBound == value) return;
    105         inclusiveLowerBound = value;
    106         UpdateExpression();
    107         OnChanged();
    108       }
    109     }
    110 
    111     [Storable]
    112     private bool inclusiveUpperBound;
    113     public bool InclusiveUpperBound {
    114       get => inclusiveUpperBound;
    115       set {
    116         if (inclusiveUpperBound == value) return;
    117         inclusiveUpperBound = value;
    118         UpdateExpression();
    119         OnChanged();
    120       }
    121     }
    122 
    123     [Storable]
    124100    private bool enabled;
    125101    public bool Enabled {
     
    135111    private IntervalConstraint(StorableConstructorFlag _) : base(_) { }
    136112
    137     public IntervalConstraint(string expression, string variable, string target, int numberOfDerivation, Interval interval, bool inclusiveLowerBound,
    138       bool inclusiveUpperBound, bool enabled) : base(){
     113    public IntervalConstraint(string expression, string variable, string target, int numberOfDerivation, Interval interval, bool enabled) : base(){
    139114      this.expression = expression;
    140115      this.variable = variable;
     
    142117      this.numberOfDerivation = numberOfDerivation;
    143118      this.interval = interval;
    144       this.inclusiveLowerBound = inclusiveLowerBound;
    145       this.inclusiveUpperBound = inclusiveUpperBound;
    146119      this.enabled = enabled;
    147120    }
     
    158131      this.NumberOfDerivation = original.NumberOfDerivation;
    159132      this.Interval = original.Interval;
    160       this.InclusiveLowerBound = original.InclusiveLowerBound;
    161       this.InclusiveUpperBound = original.InclusiveUpperBound;
    162133      this.Enabled = original.Enabled;
    163134    }
     
    189160        expression = string.Format("Target:{0} in {1}{2} .. {3}{4}",
    190161          Variable,
    191           (InclusiveLowerBound) ? "[" : "]",
     162          "[",
    192163          Interval?.LowerBound,
    193164          Interval?.UpperBound,
    194           (InclusiveUpperBound) ? "]" : "[");
     165          "]");
    195166        Expression = expression;
    196167        return;
     
    199170        Variable,
    200171        Target,
    201         (InclusiveLowerBound) ? "[" : "]",
     172        "[",
    202173        Interval?.LowerBound,
    203174        Interval?.UpperBound,
    204         (InclusiveUpperBound) ? "]" : "[",
     175        "]",
    205176        GetDerivationString(numberOfDerivation));
    206177        Expression = expression;
Note: See TracChangeset for help on using the changeset viewer.