Changeset 3512 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
- Timestamp:
- 04/23/10 14:27:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
r3485 r3512 69 69 var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightNu, Symbol.WeightSigma); 70 70 weight = normalDistributedRNG.NextDouble(); 71 var variableList = new List<string>(Symbol.VariableNames); 72 int variableIndex = random.Next(0, variableList.Count); 73 variableName = variableList[variableIndex]; 71 variableName = Symbol.VariableNames.SelectRandom(random); 74 72 } 73 74 public override void ShakeLocalParameters(IRandom random, double shakingFactor) { 75 base.ShakeLocalParameters(random, shakingFactor); 76 var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma); 77 double x = normalDistributedRNG.NextDouble(); 78 weight = weight + x * shakingFactor; 79 variableName = Symbol.VariableNames.SelectRandom(random); 80 } 81 75 82 76 83 public override object Clone() {
Note: See TracChangeset
for help on using the changeset viewer.