Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/18/17 10:54:13 (7 years ago)
Author:
gkronber
Message:

#2650 added a way to set the probability of variable changes via the GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs

    r14251 r14759  
    100100      multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null;
    101101      multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
     102      varChangeProbTextBox.Enabled = Content != null;
     103      varChangeProbTextBox.ReadOnly = ReadOnly;
    102104    }
    103105
     
    174176      }
    175177    }
     178
     179    private void VarProbTextBox_TextChanged(object sender, EventArgs e) {
     180      double prob;
     181      if(double.TryParse(varChangeProbTextBox.Text, out prob) && prob >= 0.0 && prob <= 1.0) {
     182        Content.VariableChangeProbability = prob;
     183        errorProvider.SetError(varChangeProbTextBox, string.Empty);
     184      } else {
     185        errorProvider.SetError(varChangeProbTextBox, "Invalid value");
     186      }
     187    }
    176188    #endregion
    177189
     
    183195        additiveWeightChangeSigmaTextBox.Text = string.Empty;
    184196        multiplicativeWeightChangeSigmaTextBox.Text = string.Empty;
     197        varChangeProbTextBox.Text = string.Empty;
    185198        // temporarily deregister to prevent circular calling of events
    186199        DeregisterVariableNamesViewContentEvents();
     
    200213        additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString();
    201214        multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString();
     215        varChangeProbTextBox.Text = Content.VariableChangeProbability.ToString();
    202216      }
    203217      SetEnabledStateOfControls();
    204218    }
    205219    #endregion
     220
    206221  }
    207222}
Note: See TracChangeset for help on using the changeset viewer.