Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/VariableInteractionNetwork.cs @ 14275

Last change on this file since 14275 was 14275, checked in by bburlacu, 8 years ago

#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 size: 2.8 KB
RevLine 
[13728]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
[14275]22using System;
[13728]23using HeuristicLab.Common;
24using HeuristicLab.Core;
25using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
26
27namespace HeuristicLab.VariableInteractionNetworks {
28  [Item("VariableInteractionNetwork", "A graph representation of variables and their relationships.")]
29  [StorableClass]
30  public class VariableInteractionNetwork : DirectedGraph {
31    public VariableInteractionNetwork() { }
32
33    protected VariableInteractionNetwork(VariableInteractionNetwork original, Cloner cloner) : base(original, cloner) { }
34
35    public override IDeepCloneable Clone(Cloner cloner) {
36      return new VariableInteractionNetwork(this, cloner);
37    }
38  }
39
40  [Item("VariableNetworkNode", "A graph vertex which represents a symbolic regression variable.")]
41  [StorableClass]
[14275]42  public class VariableNetworkNode : Vertex<IDeepCloneable>, INetworkNode {
43    public VariableNetworkNode() {
44      Id = Guid.NewGuid().ToString();
45    }
[13772]46
[14275]47    public VariableNetworkNode(VariableNetworkNode original, Cloner cloner) : base(original, cloner) {
48      Id = original.Id;
49      Description = original.Description;
50    }
[13772]51
52    public override IDeepCloneable Clone(Cloner cloner) {
53      return new VariableNetworkNode(this, cloner);
54    }
[14275]55
56    public string Id { get; }
57    public string Description { get; set; }
[13728]58  }
59
60  [Item("FunctionNetworkNode", "A graph vertex representing a junction node.")]
61  [StorableClass]
[14275]62  public class JunctionNetworkNode : Vertex<IDeepCloneable>, INetworkNode {
63    public JunctionNetworkNode() {
64      Id = Guid.NewGuid().ToString();
65    }
[13772]66
[14275]67    public JunctionNetworkNode(JunctionNetworkNode original, Cloner cloner) : base(original, cloner) {
68      Id = original.Id;
69      Description = original.Description;
70    }
[13772]71
72    public override IDeepCloneable Clone(Cloner cloner) {
73      return new JunctionNetworkNode(this, cloner);
74    }
[14275]75
76    public string Id { get; }
77    public string Description { get; set; }
[13728]78  }
79}
Note: See TracBrowser for help on using the repository browser.