source: branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/Arc.cs @ 10267

Last change on this file since 10267 was 10267, checked in by bburlacu, 7 years ago

#1772: Updated files in the HeuristicLab.EvolutionTracking project.

File size: 1.4 KB
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
4
5namespace HeuristicLab.EvolutionaryTracking {
6  /// <summary>
7  /// An arc that can have a weight, a label, and can old additional information in the Data object
8  /// </summary>
9  [StorableClass]
10  public class Arc : Item, IArc {
11    [Storable]
12    private IVertex source;
13    public IVertex Source { get { return source; } set { source = value; } }
14    [Storable]
15    private IVertex target;
16    public IVertex Target { get { return target; } set { target = value; } }
17    [Storable]
18    private string label;
19    public string Label { get { return label; } set { label = value; } }
20    [Storable]
21    private double weight;
22    public double Weight { get { return weight; } set { weight = value; } }
23    [Storable]
24    private object data;
25    public object Data { get { return data; } set { data = value; } }
26
27    [StorableConstructor]
28    public Arc(bool deserializing) : base(deserializing) { }
29
30    public override IDeepCloneable Clone(Cloner cloner) {
31      return new Arc(this, cloner);
32    }
33    public Arc() { }
34
35    protected Arc(Arc original, Cloner cloner)
36      : base(original, cloner) {
37      Source = original.Source;
38      Target = original.Target;
39      Label = original.Label;
40      Weight = original.Weight;
41      Data = original.Data;
42    }
43  }
44}
Note: See TracBrowser for help on using the repository browser.