Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/04/11 02:18:27 (13 years ago)
Author:
cneumuel
Message:

#1215

  • lots of memory-consumption improvements
  • validValues -> validTypes (this saves memory!)
  • changed manipulators; modifications are less significant, out-of-bound-values are resampled instead of set to lower or upper bound
  • changed the way a base-level algorithm gets executed -> introduced AlgorithmExecutor
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/ConstrainedValue.cs

    r5112 r5207  
    3333
    3434    [Storable]
    35     protected IItemSet<IItem> validValues;
    36     public IItemSet<IItem> ValidValues {
    37       get { return validValues; }
     35    protected Type[] validTypes;
     36    public Type[] ValidTypes {
     37      get { return validTypes; }
    3838      protected set {
    39         if (this.validValues != value) {
    40           this.validValues = value;
     39        if (this.validTypes != value) {
     40          this.validTypes = value;
    4141        }
    4242      }
     
    6565    [StorableConstructor]
    6666    protected ConstrainedValue(bool deserializing) : base(deserializing) { }
    67     public ConstrainedValue(IItem value, Type valueDataType, IItemSet<IItem> validValues, bool isNullable) {
     67    public ConstrainedValue(IItem value, Type valueDataType, Type[] validTypes, bool isNullable) {
    6868      this.Value = value;
    6969      this.ValueDataType = valueDataType;
    70       this.ValidValues = validValues;
     70      this.ValidTypes = validTypes;
    7171      this.isNullable = isNullable;
    7272    }
     
    7474      this.valueDataType = original.valueDataType;
    7575      this.Value = cloner.Clone(original.value);
    76       this.ValidValues = cloner.Clone(original.ValidValues);
     76      if(original.ValidTypes != null) this.ValidTypes = original.ValidTypes.ToArray();
    7777      this.isNullable = original.isNullable;
    7878    }
Note: See TracChangeset for help on using the changeset viewer.