Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/20 14:04:59 (5 years ago)
Author:
mkommend
Message:

#2971: Further minor refactorings and renaming of members.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraint.cs

    r17370 r17506  
    2020#endregion
    2121using System;
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    24 using HEAL.Attic;
    2525
    2626namespace HeuristicLab.Problems.DataAnalysis {
     
    6060    public string Target {
    6161      get => target;
    62       set {
     62      private set {
    6363        if (target == value) return;
    6464        target = value;
     
    6868    }
    6969
    70     public bool IsDerivation {
    71       get => numberOfDerivation > 0;
     70    public bool IsDerivative {
     71      get => NumberOfDerivations > 0;
    7272    }
    7373
    7474    [Storable]
    75     private int numberOfDerivation;
    76     public int NumberOfDerivation {
    77       get => numberOfDerivation;
     75    private int numberOfDerivations;
     76    public int NumberOfDerivations {
     77      get => numberOfDerivations;
    7878      set {
    7979        if (value < 0 || value > 3) throw new ArgumentException("Number of derivation has to be between 0 - 3.");
    80         if (numberOfDerivation == value) return;
    81         numberOfDerivation = value;
     80        if (numberOfDerivations == value) return;
     81        numberOfDerivations = value;
    8282        UpdateExpression();
    8383        OnChanged();
     
    111111    private IntervalConstraint(StorableConstructorFlag _) : base(_) { }
    112112
    113     public IntervalConstraint(string expression, string variable, string target, int numberOfDerivation, Interval interval, bool enabled) : base(){
     113    public IntervalConstraint(string expression, string variable, string target, int numberOfDerivations, Interval interval, bool enabled) : base(){
    114114      this.expression = expression;
    115115      this.variable = variable;
    116116      this.target = target;
    117       this.numberOfDerivation = numberOfDerivation;
     117      this.numberOfDerivations = numberOfDerivations;
    118118      this.interval = interval;
    119119      this.enabled = enabled;
     
    129129      this.Variable = original.Variable;
    130130      this.Target = original.Target;
    131       this.NumberOfDerivation = original.NumberOfDerivation;
     131      this.NumberOfDerivations = original.NumberOfDerivations;
    132132      this.Interval = original.Interval;
    133133      this.Enabled = original.Enabled;
     
    157157      var expression = "";
    158158
    159       if (!IsDerivation) {
     159      if (!IsDerivative) {
    160160        expression = string.Format("Target:{0} in {1}{2} .. {3}{4}",
    161161          Variable,
     
    174174        Interval?.UpperBound,
    175175        "]",
    176         GetDerivationString(numberOfDerivation));
     176        GetDerivationString(numberOfDerivations));
    177177        Expression = expression;
    178178    }
    179179
    180180    private string GetDefinitionString() {
    181       if (!IsDerivation) {
     181      if (!IsDerivative) {
    182182        return "Target " + Variable;
    183183      }
    184       var definition = $"∂{GetDerivationString(numberOfDerivation)}Target/∂{Variable}{GetDerivationString(numberOfDerivation)}";
     184      var definition = $"∂{GetDerivationString(numberOfDerivations)}Target/∂{Variable}{GetDerivationString(numberOfDerivations)}";
    185185      return definition;
    186186    }
Note: See TracChangeset for help on using the changeset viewer.