- Timestamp:
- 04/06/17 11:42:05 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNodeBase.cs
r14826 r14831 79 79 } 80 80 81 if (Symbol.VariableChangeProbability >= 1.0 || random.NextDouble() < Symbol.VariableChangeProbability) { 82 var oldName = variableName; 81 if (Symbol.VariableChangeProbability >= 1.0) { 82 // old behaviour for backwards compatibility 83 #region Backwards compatible code, remove with 3.4 83 84 #pragma warning disable 612, 618 84 85 variableName = Symbol.VariableNames.SelectRandom(random); 85 86 #pragma warning restore 612, 618 87 #endregion 88 } else if (random.NextDouble() < Symbol.VariableChangeProbability) { 89 var oldName = variableName; 90 variableName = Symbol.VariableNames.SampleRandom(random); 86 91 if (oldName != variableName) { 92 // re-initialize weight if the variable is changed 87 93 weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma); 88 94 }
Note: See TracChangeset
for help on using the changeset viewer.