Changeset 1039
- Timestamp:
- 12/19/08 12:11:04 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/Manipulation/OnePointShaker.cs
r656 r1039 52 52 // get all nodes for which a manipulation is defined 53 53 var parametricBranches = gardener.GetAllSubTrees(tree).Where(branch => branch.Function.GetVariable(FunctionBase.MANIPULATION) != null); 54 55 if(parametricBranches.Count() == 0) return null; // don't manipulate anything if there are no nodes with a manipulation operator 56 54 57 IFunctionTree selectedBranch = parametricBranches.ElementAt(mt.Next(parametricBranches.Count())); 55 58 IOperator mutation = (IOperator)selectedBranch.Function.GetVariable(FunctionBase.MANIPULATION).Value;
Note: See TracChangeset
for help on using the changeset viewer.