Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/02/13 13:18:57 (11 years ago)
Author:
bburlacu
Message:

#1772: Refactoring of directed graph components, added code for correctly serializing vertices and edges. Added specific building blocks analyzers and new population diversity analyzer which correctly integrates with the parallel engine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Operators/Util.cs

    r9082 r9419  
    2828    }
    2929
    30     public static void WriteDot(this IDirectedGraph<SymbolNode> graph, string path) {
     30    public static void WriteDot(this IGenericGraph<SymbolNode> graph, string path) {
    3131      const double minNorm = 1.0, maxNorm = 3.0;
    3232
     
    3737      var max = arcs.Max(x => x.Weight);
    3838
    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))
    4040                                  .ToDictionary(x => x.Key, x => x.Value);
    4141
     
    7575      }
    7676    }
    77     public static void WriteGml(this IDirectedGraph<SymbolNode> graph, string path) {
     77    public static void WriteGml(this IGenericGraph<SymbolNode> graph, string path) {
    7878      var idMap = new Dictionary<string, int>();
    7979      const double minNorm = 1.0, maxNorm = 3.0;
     
    8686      var max = arcs.Max(x => x.Weight);
    8787
    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))
    8989                                  .ToDictionary(x => x.Key, x => x.Value);
    9090
Note: See TracChangeset for help on using the changeset viewer.