Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14829


Ignore:
Timestamp:
04/06/17 11:22:40 (8 years ago)
Author:
gkronber
Message:

#2650: reformatting of VariableBase

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableBase.cs

    r14826 r14829  
    3434      get { return weightMu; }
    3535      set {
    36         if(value != weightMu) {
     36        if (value != weightMu) {
    3737          weightMu = value;
    3838          OnChanged(EventArgs.Empty);
     
    4545      get { return weightSigma; }
    4646      set {
    47         if(weightSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
    48         if(value != weightSigma) {
     47        if (weightSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
     48        if (value != weightSigma) {
    4949          weightSigma = value;
    5050          OnChanged(EventArgs.Empty);
     
    5757      get { return weightManipulatorMu; }
    5858      set {
    59         if(value != weightManipulatorMu) {
     59        if (value != weightManipulatorMu) {
    6060          weightManipulatorMu = value;
    6161          OnChanged(EventArgs.Empty);
     
    6868      get { return weightManipulatorSigma; }
    6969      set {
    70         if(weightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
    71         if(value != weightManipulatorSigma) {
     70        if (weightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
     71        if (value != weightManipulatorSigma) {
    7272          weightManipulatorSigma = value;
    7373          OnChanged(EventArgs.Empty);
     
    8080      get { return multiplicativeWeightManipulatorSigma; }
    8181      set {
    82         if(multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
    83         if(value != multiplicativeWeightManipulatorSigma) {
     82        if (multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
     83        if (value != multiplicativeWeightManipulatorSigma) {
    8484          multiplicativeWeightManipulatorSigma = value;
    8585          OnChanged(EventArgs.Empty);
     
    9494      get { return variableChangeProbability; }
    9595      set {
    96         if(value < 0 || value > 1.0) throw new ArgumentException("Variable change probability must lie in the interval [0..1]");
     96        if (value < 0 || value > 1.0) throw new ArgumentException("Variable change probability must lie in the interval [0..1]");
    9797        variableChangeProbability = value;
    9898      }
     
    104104      get { return variableNames; }
    105105      set {
    106         if(value == null) throw new ArgumentNullException();
     106        if (value == null) throw new ArgumentNullException();
    107107        variableNames.Clear();
    108108        variableNames.AddRange(value);
     
    116116      get { return allVariableNames; }
    117117      set {
    118         if(value == null) throw new ArgumentNullException();
     118        if (value == null) throw new ArgumentNullException();
    119119        allVariableNames.Clear();
    120120        allVariableNames.AddRange(value);
     
    124124    public override bool Enabled {
    125125      get {
    126         if(variableNames.Count == 0) return false;
     126        if (variableNames.Count == 0) return false;
    127127        return base.Enabled;
    128128      }
    129129      set {
    130         if(variableNames.Count == 0) base.Enabled = false;
     130        if (variableNames.Count == 0) base.Enabled = false;
    131131        else base.Enabled = value;
    132132      }
     
    146146    [StorableHook(HookType.AfterDeserialization)]
    147147    private void AfterDeserialization() {
    148       if(allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
     148      if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
    149149        allVariableNames = variableNames;
    150150      }
     
    167167      multiplicativeWeightManipulatorSigma = original.multiplicativeWeightManipulatorSigma;
    168168      variableChangeProbability = original.variableChangeProbability;
    169       }
     169    }
    170170    protected VariableBase(string name, string description)
    171171      : base(name, description) {
Note: See TracChangeset for help on using the changeset viewer.