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/SymbolGraph.cs

    r9082 r9419  
    2121
    2222using System.Collections.Generic;
     23using System.Linq;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    2829  [Item("Symbol graph", "A graph used to store the relationship between symbols in a population of individuals")]
    2930  [StorableClass]
    30   public class SymbolGraph : DirectedGraph<SymbolNode> {
     31  public class SymbolGraph : GenericGraph<SymbolNode> {
    3132    [Storable]
    3233    private Dictionary<string, SymbolNode> nodes = new Dictionary<string, SymbolNode>();
     
    5859    public Dictionary<int, int> Positions { get; set; }
    5960    public double AverageArity { get; set; }
     61
     62    public new List<SymbolArc> InEdges {
     63      get { return base.InEdges == null ? null : base.InEdges.Cast<SymbolArc>().ToList(); }
     64    }
     65
     66    public new List<SymbolArc> OutEdges {
     67      get { return base.OutEdges == null ? null : base.OutEdges.Cast<SymbolArc>().ToList(); }
     68    }
     69  }
     70
     71  public class SymbolArc : IEdge {
     72    public IVertex Source { get; set; }
     73    public IVertex Target { get; set; }
     74    public double Weight { get; set; }
    6075  }
    6176}
    62 
Note: See TracChangeset for help on using the changeset viewer.