Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12447


Ignore:
Timestamp:
06/15/15 15:47:47 (9 years ago)
Author:
pfleck
Message:

#2027

  • Renamed TerminatonParameter to TerminatorParameter.
  • Renamed Comparison to ComparisonType.
Location:
branches/TerminationCriteria
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/TerminationCriteria/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs

    r12412 r12447  
    114114      get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
    115115    }
    116     private IValueParameter<MultiTerminator> TerminationParameter {
    117       get { return (IValueParameter<MultiTerminator>)Parameters["Termination"]; }
     116    private IValueParameter<MultiTerminator> TerminatorParameter {
     117      get { return (IValueParameter<MultiTerminator>)Parameters["Terminator"]; }
    118118    }
    119119    #endregion
     
    197197    }
    198198    private MultiTerminator Terminators {
    199       get { return TerminationParameter.Value; }
     199      get { return TerminatorParameter.Value; }
    200200    }
    201201    private RandomCreator RandomCreator {
     
    279279      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
    280280      Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
    281       Parameters.Add(new ValueParameter<MultiTerminator>("Termination", "The termination criteria which sould be checked.", new MultiTerminator()));
     281      Parameters.Add(new ValueParameter<MultiTerminator>("Terminator", "The termination criteria which sould be checked.", new MultiTerminator()));
    282282
    283283      RandomCreator randomCreator = new RandomCreator();
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/ComparisonTerminator.cs

    r12436 r12447  
    4040    }
    4141
    42     public ComparisonType Comparison {
     42    public ComparisonType ComparisonType {
    4343      get { return ComparisonParameter.Value.Value; }
    4444      set { ComparisonParameter.Value.Value = value; }
     
    6767      Initialize();
    6868    }
    69     public ComparisonTerminator(string comparisonValueActualName, ComparisonType comparison, T threshold)
     69    public ComparisonTerminator(string comparisonValueActualName, ComparisonType comparisonType, T threshold)
    7070      : this(threshold) {
    7171      ComparisonValueParameter.ActualName = comparisonValueActualName;
    72       Comparison = comparison;
     72      ComparisonType = comparisonType;
    7373    }
    74     public ComparisonTerminator(string comparisonValueActualName, ComparisonType comparison, IFixedValueParameter<T> thresholdParameter)
     74    public ComparisonTerminator(string comparisonValueActualName, ComparisonType comparisonType, IFixedValueParameter<T> thresholdParameter)
    7575      : this() {
    7676      ComparisonValueParameter.ActualName = comparisonValueActualName;
    77       Comparison = comparison;
     77      ComparisonType = comparisonType;
    7878      ThresholdParameter = thresholdParameter;
    7979    }
     
    8383      IComparable rhs = ThresholdParameter.Value;
    8484
    85       return Comparison.Compare(lhs, rhs);
     85      return ComparisonType.Compare(lhs, rhs);
    8686    }
    8787
    8888    private void Initialize() {
    89       ComparisonParameter.Value.ValueChanged += new EventHandler(Comparison_ValueChanged);
     89      ComparisonParameter.Value.ValueChanged += new EventHandler(ComparisonType_ValueChanged);
    9090    }
    91     private void Comparison_ValueChanged(object sender, EventArgs e) {
    92       OnComparisonChanged();
     91    private void ComparisonType_ValueChanged(object sender, EventArgs e) {
     92      OnComparisonTypeChanged();
    9393    }
    94     protected virtual void OnComparisonChanged() {
     94    protected virtual void OnComparisonTypeChanged() {
    9595      OnToStringChanged();
    9696    }
     
    103103    public override string ToString() {
    104104      if (Threshold == null) return Name;
    105       else return string.Format("{0} {1} {2}", Name, Comparison.ToSymbol(), ThresholdParameter.Value);
     105      else return string.Format("{0} {1} {2}", Name, ComparisonType.ToSymbol(), ThresholdParameter.Value);
    106106    }
    107107  }
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/SingleObjectiveQualityTerminator.cs

    r12444 r12447  
    4343      if (maximizationParameter != null) {
    4444        bool maximization = maximizationParameter.Value.Value;
    45         Comparison = maximization ? ComparisonType.Less : ComparisonType.Greater;
     45        ComparisonType = maximization ? ComparisonType.Less : ComparisonType.Greater;
    4646        Threshold.Value = maximization ? double.MaxValue : double.MinValue;
    4747      }
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/TerminationOperator.cs

    r12444 r12447  
    3131  [StorableClass]
    3232  public sealed class TerminationOperator : InstrumentedOperator, ITerminationBasedOperator {
    33     public ILookupParameter<ITerminator> TerminationParameter {
    34       get { return (ILookupParameter<ITerminator>)Parameters["Termination"]; }
     33    public ILookupParameter<ITerminator> TerminatorParameter {
     34      get { return (ILookupParameter<ITerminator>)Parameters["Terminator"]; }
    3535    }
    3636    public ILookupParameter<BoolValue> TerminateParameter {
     
    6464    public TerminationOperator()
    6565      : base() {
    66       Parameters.Add(new LookupParameter<ITerminator>("Termination", "The termination criteria which sould be checked."));
     66      Parameters.Add(new LookupParameter<ITerminator>("Terminator", "The termination criteria which sould be checked."));
    6767      Parameters.Add(new LookupParameter<BoolValue>("Terminate", "The parameter which will be set to determine if execution should be terminated or schould continue."));
    6868      Parameters.Add(new OperatorParameter("ContinueBranch", "The operator which is executed if no termination criteria has met."));
     
    7474
    7575      var placeholder = new Placeholder() { Name = "Check termination criteria (Placeholder)" };
    76       placeholder.OperatorParameter.ActualName = TerminationParameter.Name;
     76      placeholder.OperatorParameter.ActualName = TerminatorParameter.Name;
    7777
    7878      BeforeExecutionOperators.Add(assigner);
Note: See TracChangeset for help on using the changeset viewer.