Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/21 16:41:42 (3 years ago)
Author:
gkronber
Message:

#3073 refactoring to prepare for trunk reintegration

Location:
branches/3073_IA_constraint_splitting_reintegration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting_reintegration

    • Property svn:ignore
      •  

        old new  
        11bin
         2TestResults
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs

    r17887 r17891  
    102102    }
    103103
    104     [Storable]
    105     private bool enabled;
    106 
    107     public bool Enabled {
    108       get => enabled;
    109       set {
    110         if (enabled == value)
    111           return;
    112         enabled = value;
    113         OnChanged();
    114       }
    115     }
     104    // [Storable]
     105    // private bool enabled;
     106    //
     107    // public bool Enabled {
     108    //   get => enabled;
     109    //   set {
     110    //     if (enabled == value)
     111    //       return;
     112    //     enabled = value;
     113    //     OnChanged();
     114    //   }
     115    // }
    116116
    117117    [Storable]
     
    143143
    144144    // without derivation
    145     public ShapeConstraint(Interval interval, double weight, bool enabled)
     145    public ShapeConstraint(Interval interval, double weight)
    146146      : this(string.Empty, 0,
    147          interval, new IntervalCollection(), weight, enabled) { }
    148 
    149     public ShapeConstraint(Interval interval, IntervalCollection regions, double weight, bool enabled)
     147         interval, new IntervalCollection(), weight) { }
     148
     149    public ShapeConstraint(Interval interval, IntervalCollection regions, double weight)
    150150      : this(string.Empty, 0,
    151          interval, regions, weight, enabled) { }
     151         interval, regions, weight) { }
    152152
    153153    public ShapeConstraint(string variable, int numberOfDerivations,
    154                               Interval interval, double weight, bool enabled)
     154                              Interval interval, double weight)
    155155      : this(variable, numberOfDerivations,
    156              interval, new IntervalCollection(), weight, enabled) { }
     156             interval, new IntervalCollection(), weight) { }
    157157
    158158    public ShapeConstraint(string variable, int numberOfDerivations,
    159                               Interval interval, IntervalCollection regions, double weight, bool enabled) {
     159                              Interval interval, IntervalCollection regions, double weight) {
    160160      this.regions = regions;
    161161      this.weight = weight;
     
    163163      this.numberOfDerivations = numberOfDerivations;
    164164      this.interval = interval;
    165       this.enabled = enabled;
     165      //this.enabled = enabled;
    166166    }
    167167
     
    176176      NumberOfDerivations = original.NumberOfDerivations;
    177177      Interval = original.Interval;
    178       Enabled = original.Enabled;
     178      //Enabled = original.Enabled;
    179179    }
    180180
     
    208208        if (Regions != null) {
    209209          foreach (var region in Regions.GetReadonlyDictionary())
    210             expression += $", {region.Key}=({region.Value.LowerBound} .. {region.Value.UpperBound})";
     210            expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]";
     211        }
     212        if (Weight != 1.0) {
     213          expression += $" weight: {weight}";
    211214        }
    212215
     
    226229      if (Regions != null) {
    227230        foreach (var region in Regions.GetReadonlyDictionary())
    228           expression += $", {region.Key}=({region.Value.LowerBound} .. {region.Value.UpperBound})";
     231          expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]";
     232      }
     233      if(Weight != 1.0) {
     234        expression += $" weight: {weight}";
    229235      }
    230236      return expression;
Note: See TracChangeset for help on using the changeset viewer.