- Timestamp:
- 01/17/12 15:23:30 (13 years ago)
- Location:
- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/ExtensionMethods.cs
r7319 r7345 74 74 } 75 75 76 /// <summary> 77 /// Walks an operator graph in that it jumps from one operator to all its operator parameters and yields each operator it touches. 78 /// Cycles are detected and not walked twice. 79 /// </summary> 80 /// <param name="initial">The operator where the walk starts (is also yielded).</param> 81 /// <returns>An enumeration of all the operators that could be found.</returns> 82 public static IEnumerable<IOperator> Walk(this IOperator initial) { 83 var open = new Stack<IOperator>(); 84 var visited = new HashSet<IOperator>(); 85 open.Push(initial); 86 87 while (open.Any()) { 88 IOperator current = open.Pop(); 89 if (visited.Contains(current)) continue; 90 visited.Add(current); 91 92 foreach (var parameter in current.Parameters.OfType<IValueParameter>()) { 93 if (typeof(IOperator).IsAssignableFrom(parameter.DataType)) { 94 if (parameter.Value != null) 95 open.Push((IOperator)parameter.Value); 96 } 97 } 98 99 yield return current; 100 } 101 } 102 76 103 } 77 104 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Plugin.cs.frame
r7319 r7345 23 23 24 24 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment { 25 [Plugin("HeuristicLab.Problems.GeneralizedQuadraticAssignment", "3.3. 5.$WCREV$")]25 [Plugin("HeuristicLab.Problems.GeneralizedQuadraticAssignment", "3.3.6.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Properties/AssemblyInfo.cs.frame
r7319 r7345 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 5.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.6.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.