Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/15 14:21:23 (10 years ago)
Author:
mkommend
Message:

#2293: Merged r11756 and r11758 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMultiNeighborhoodShakingOperator.cs

    r11170 r11873  
    2121
    2222using HeuristicLab.Core;
     23using HeuristicLab.Data;
    2324
    2425namespace HeuristicLab.Encodings.RealVectorEncoding {
    2526  public interface IRealVectorMultiNeighborhoodShakingOperator : IRealVectorOperator {
    2627    ILookupParameter<RealVector> RealVectorParameter { get; }
     28    IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    2729  }
    2830}
  • stable/HeuristicLab.Encodings.RealVectorEncoding/3.3/ShakingOperators/RealVectorShakingOperator.cs

    r11170 r11873  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Data;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Optimization.Operators;
     
    4748    }
    4849
     50    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
     51      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
     52    }
     53
     54
    4955    [StorableConstructor]
    5056    protected RealVectorShakingOperator(bool deserializing) : base(deserializing) { }
     
    5763      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector to shake."));
    5864      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator that will be used for stochastic shaking operators."));
     65      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled."));
    5966      foreach (IRealVectorManipulator shaker in ApplicationManager.Manager.GetInstances<IRealVectorManipulator>().OrderBy(x => x.Name))
    6067        if (!(shaker is MultiRealVectorManipulator)
    6168          && !(shaker is ISelfAdaptiveManipulator)) Operators.Add(shaker);
     69    }
     70
     71    [StorableHook(HookType.AfterDeserialization)]
     72    private void AfterDeserialization() {
     73      #region Backwards compatible code, remove with 3.4
     74      if (!Parameters.ContainsKey("Bounds"))
     75        Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled."));
     76      #endregion
    6277    }
    6378
Note: See TracChangeset for help on using the changeset viewer.