Changeset 9419 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Operators/Util.cs
- Timestamp:
- 05/02/13 13:18:57 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Operators/Util.cs
r9082 r9419 28 28 } 29 29 30 public static void WriteDot(this I DirectedGraph<SymbolNode> graph, string path) {30 public static void WriteDot(this IGenericGraph<SymbolNode> graph, string path) { 31 31 const double minNorm = 1.0, maxNorm = 3.0; 32 32 … … 37 37 var max = arcs.Max(x => x.Weight); 38 38 39 var normalizedWeights = arcs.Select(arc => new KeyValuePair< Arc, double>(arc, (arc.Weight - min) * (maxNorm - minNorm) / (max - min) + minNorm))39 var normalizedWeights = arcs.Select(arc => new KeyValuePair<SymbolArc, double>(arc, (arc.Weight - min) * (maxNorm - minNorm) / (max - min) + minNorm)) 40 40 .ToDictionary(x => x.Key, x => x.Value); 41 41 … … 75 75 } 76 76 } 77 public static void WriteGml(this I DirectedGraph<SymbolNode> graph, string path) {77 public static void WriteGml(this IGenericGraph<SymbolNode> graph, string path) { 78 78 var idMap = new Dictionary<string, int>(); 79 79 const double minNorm = 1.0, maxNorm = 3.0; … … 86 86 var max = arcs.Max(x => x.Weight); 87 87 88 var normalizedWeights = arcs.Select(arc => new KeyValuePair< Arc, double>(arc, (arc.Weight - min) * (maxNorm - minNorm) / (max - min) + minNorm))88 var normalizedWeights = arcs.Select(arc => new KeyValuePair<SymbolArc, double>(arc, (arc.Weight - min) * (maxNorm - minNorm) / (max - min) + minNorm)) 89 89 .ToDictionary(x => x.Key, x => x.Value); 90 90
Note: See TracChangeset
for help on using the changeset viewer.