Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Fragment.cs @ 10347

Last change on this file since 10347 was 10347, checked in by bburlacu, 10 years ago

#1772: Small changes to the GenealogyGraph. Added generic Fragment class and interface. Added the SymbolicDataAnalysisPopulationDiversityAnalyzer. Added specialized tracking operators for symbolic data analysis. Merged trunk changes.

File size: 1.1 KB
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
4
5namespace HeuristicLab.EvolutionTracking {
6  [StorableClass]
7  [Item("Fragment", "An object that stores a ")]
8  public class Fragment : Item, IFragment {
9    [Storable]
10    private int newPos;
11    public int NewPos { get { return newPos; } set { newPos = value; } }
12
13    [Storable]
14    private int oldPos;
15    public int OldPos { get { return oldPos; } set { oldPos = value; } }
16
17    [Storable]
18    private object root;
19    public object Root {
20      get { return root; }
21      set { root = value; }
22    }
23
24    protected Fragment(Fragment original, Cloner cloner)
25      : base(original, cloner) {
26      Root = original.Root;
27      NewPos = original.NewPos;
28      OldPos = original.OldPos;
29    }
30    public override IDeepCloneable Clone(Cloner cloner) {
31      return new Fragment(this, cloner);
32    }
33    public Fragment() { }
34  }
35
36  public class Fragment<T> : Fragment, IFragment<T> where T : class {
37    public new T Root {
38      get { return (T)base.Root; }
39      set { base.Root = value; }
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.