- Timestamp:
- 06/13/12 13:20:38 (13 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/Plugin.cs
r7817 r7997 26 26 /// Plugin class for HeuristicLab.Selection plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Selection", "3.3.6.78 00")]28 [Plugin("HeuristicLab.Selection", "3.3.6.7817")] 29 29 [PluginFile("HeuristicLab.Selection-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/ProportionalSelector.cs
r7779 r7997 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;29 28 using HeuristicLab.Optimization; 30 29 using HeuristicLab.Parameters; … … 103 102 // map the selected (cloned) tree to the original tree 104 103 var original = scopes[index].Variables.First().Value; 105 var clone = selected[i].Variables.First().Value; 104 var clone = selected[i].Variables.First().Value; 106 105 GlobalCloneMap.Add(clone, original); 107 106 } else { -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/RandomSelector.cs
r7779 r7997 21 21 22 22 using System.Collections.Generic; 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 69 70 70 71 for (int i = 0; i < count; i++) { 71 if (copy) 72 selected[i] = (IScope)scopes[random.Next(scopes.Count)].Clone(); 73 else { 72 if (copy) { 73 int index = random.Next(scopes.Count); 74 selected[i] = (IScope)scopes[index].Clone(); 75 // map the selected (cloned) tree to the original tree 76 var original = scopes[index].Variables.First().Value; 77 var clone = selected[i].Variables.First().Value; 78 GlobalCloneMap.Add(clone, original); 79 } else { 74 80 int index = random.Next(scopes.Count); 75 81 selected[i] = scopes[index]; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/Selector.cs
r7779 r7997 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;26 25 using HeuristicLab.Operators; 27 26 using HeuristicLab.Parameters; … … 74 73 while (gScope.Parent != null) gScope = gScope.Parent; 75 74 gScope.Variables.Add(new Variable(GlobalCloneMapParameterName, new CloneMapType())); 76 } else {77 GlobalCloneMap.Clear();78 75 } 79 80 76 IScope[] selected = Select(scopes); 81 77
Note: See TracChangeset
for help on using the changeset viewer.