Free cookie consent management tool by TermsFeed Policy Generator

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

#2027

  • Renamed TerminatonParameter to TerminatorParameter.
  • Renamed Comparison to ComparisonType.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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  }
Note: See TracChangeset for help on using the changeset viewer.