Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/17/16 15:41:33 (8 years ago)
Author:
gkronber
Message:

#2697: reverse merge of r14378, r14390, r14391, r14393, r14394, r14396

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs

    r14393 r14400  
    5252    public double Multiplier {
    5353      get { return MultiplierParameter.Value.Value; }
    54       set {
     54      protected set {
    5555        MultiplierParameter.Value.Value = value;
    5656      }
     
    5959    public double Addend {
    6060      get { return AddendParameter.Value.Value; }
    61       set {
     61      protected set {
    6262        AddendParameter.Value.Value = value;
    6363      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs

    r14393 r14400  
    7171
    7272    public override IEnumerable<double> Apply(IEnumerable<double> data) {
     73      ConfigureParameters(data);
    7374      if (OriginalStandardDeviation.IsAlmost(0.0)) {
    7475        return data;
     
    9394    }
    9495
    95     public override void ConfigureParameters(IEnumerable<double> data) {
     96    protected void ConfigureParameters(IEnumerable<double> data) {
    9697      OriginalStandardDeviation = data.StandardDeviation();
    9798      OriginalMean = data.Average();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs

    r14393 r14400  
    4444    }
    4545
     46    public override IEnumerable<double> Apply(IEnumerable<double> data) {
     47      ConfigureParameters(data);
     48      return base.Apply(data);
     49    }
     50
    4651    public override bool Check(IEnumerable<double> data, out string errorMsg) {
    4752      ConfigureParameters(data);
     
    4954    }
    5055
    51     public override void ConfigureParameters(IEnumerable<double> data) {
     56    protected void ConfigureParameters(IEnumerable<double> data) {
    5257      double originalRangeStart = data.Min();
    5358      double originalRangeEnd = data.Max();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs

    r14393 r14400  
    6666    protected Transformation(IEnumerable<string> allowedColumns) : base(allowedColumns) { }
    6767
    68     public virtual void ConfigureParameters(IEnumerable<T> data) {
    69       // override in transformations with parameters
    70     }
    71 
    7268    public abstract IEnumerable<T> Apply(IEnumerable<T> data);
    73     public IEnumerable<T> ConfigureAndApply(IEnumerable<T> data) {
    74       ConfigureParameters(data);
    75       return Apply(data);
    76     }
    7769
    7870    public abstract bool Check(IEnumerable<T> data, out string errorMsg);
Note: See TracChangeset for help on using the changeset viewer.