Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6671


Ignore:
Timestamp:
08/18/11 13:00:33 (13 years ago)
Author:
epitzer
Message:

Remove unnecessary suffix parameter and correctly include grouping clause in generated item name (#1622)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionFuzzifier.cs

    r6670 r6671  
    2424      get { return (ValueParameter<StringValue>)Parameters["Target"]; }
    2525    }
    26     public ValueParameter<StringValue> SuffixParameter {
    27       get { return (ValueParameter<StringValue>)Parameters["Suffix"]; }
    28     }
    2926    public ValueParameter<DoubleValue> SpreadParameter {
    3027      get { return (ValueParameter<DoubleValue>)Parameters["Spread"]; }
     
    3936
    4037    private string Source { get { return SourceParameter.Value.Value; } }
    41     private string Target { get { return TargetParameter.Value.Value; } }
    42     private string Suffix { get { return SuffixParameter.Value.Value; } }
     38    private string Target { get { return TargetParameter.Value.Value; } }   
    4339    private double Spread { get { return SpreadParameter.Value.Value; } }
    4440    private string GroupBy { get { return GroupByParameter.Value.Value; } }
     
    5450    public RunCollectionFuzzifier() {
    5551      Parameters.Add(new ValueParameter<StringValue>("Source", "Source value name to be fuzzified.", new StringValue("Value")));
    56       Parameters.Add(new ValueParameter<StringValue>("Target", "Target value name. The new, fuzzified variable to be created.", new StringValue("Calc.Value")));
    57       Parameters.Add(new ValueParameter<StringValue>("Suffix", "The suffix of all fuzzified values.", new StringValue()));
     52      Parameters.Add(new ValueParameter<StringValue>("Target", "Target value name. The new, fuzzified variable to be created.", new StringValue("Calc.Value")));     
    5853      Parameters.Add(new ValueParameter<DoubleValue>("Spread", "The number of standard deviations considered one additional level.", new DoubleValue(1)));
    5954      Parameters.Add(new ValueParameter<StringValue>("GroupBy", "Create separate analyzes for different values of this variable.", new StringValue("")));
     
    8075    private void RegisterEvents() {
    8176      SourceParameter.ToStringChanged += Parameter_NameChanged;
    82       TargetParameter.ToStringChanged += Parameter_NameChanged;
    83       SuffixParameter.ToStringChanged += Parameter_NameChanged;
     77      TargetParameter.ToStringChanged += Parameter_NameChanged;     
    8478      GroupByParameter.ToStringChanged += Parameter_NameChanged;
    8579    }
     
    9084
    9185    private void UpdateName() {
    92       name = string.Format("{0} := Fuzzy({1}) {3}",
     86      name = string.Format("{0} := Fuzzy({1}{2})",
    9387        Target,
    9488        Source,
    95         string.IsNullOrWhiteSpace(GroupBy) ? "" : string.Format("/{0}", GroupBy),
    96         Suffix);
     89        string.IsNullOrWhiteSpace(GroupBy) ? "" : string.Format("/{0}", GroupBy));       
    9790      OnNameChanged();
    9891    }
Note: See TracChangeset for help on using the changeset viewer.