Ignore:
Timestamp:
09/07/16 15:20:29 (5 years ago)
Author:
bburlacu
Message:

#2288: Clean up code and add comments in the ConstrainedForceDirectedLayout class. Minor changes to view and directed graph chart. Introduced an INetworkNode interface for more flexibility. Updated cola and adaptagrams dlls with latest changes from upstream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/VariableInteractionNetwork.cs

    r13772 r14275  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    3940  [Item("VariableNetworkNode", "A graph vertex which represents a symbolic regression variable.")]
    4041  [StorableClass]
    41   public class VariableNetworkNode : Vertex<IDeepCloneable> {
    42     public VariableNetworkNode() { }
     42  public class VariableNetworkNode : Vertex<IDeepCloneable>, INetworkNode {
     43    public VariableNetworkNode() {
     44      Id = Guid.NewGuid().ToString();
     45    }
    4346
    44     public VariableNetworkNode(VariableNetworkNode original, Cloner cloner) : base(original, cloner) { }
     47    public VariableNetworkNode(VariableNetworkNode original, Cloner cloner) : base(original, cloner) {
     48      Id = original.Id;
     49      Description = original.Description;
     50    }
    4551
    4652    public override IDeepCloneable Clone(Cloner cloner) {
    4753      return new VariableNetworkNode(this, cloner);
    4854    }
     55
     56    public string Id { get; }
     57    public string Description { get; set; }
    4958  }
    5059
    5160  [Item("FunctionNetworkNode", "A graph vertex representing a junction node.")]
    5261  [StorableClass]
    53   public class JunctionNetworkNode : Vertex<IDeepCloneable> {
    54     public JunctionNetworkNode() { }
     62  public class JunctionNetworkNode : Vertex<IDeepCloneable>, INetworkNode {
     63    public JunctionNetworkNode() {
     64      Id = Guid.NewGuid().ToString();
     65    }
    5566
    56     public JunctionNetworkNode(JunctionNetworkNode original, Cloner cloner) : base(original, cloner) { }
     67    public JunctionNetworkNode(JunctionNetworkNode original, Cloner cloner) : base(original, cloner) {
     68      Id = original.Id;
     69      Description = original.Description;
     70    }
    5771
    5872    public override IDeepCloneable Clone(Cloner cloner) {
    5973      return new JunctionNetworkNode(this, cloner);
    6074    }
     75
     76    public string Id { get; }
     77    public string Description { get; set; }
    6178  }
    6279}
Note: See TracChangeset for help on using the changeset viewer.