Changeset 10105 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionInformation.cs
- Timestamp:
- 11/05/13 10:27:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionInformation.cs
r10096 r10105 27 27 28 28 namespace HeuristicLab.Analysis.SolutionCaching { 29 public enum ProducedBy { Crossover, Mutation, CrossoverAndMutation, Move, Other};29 public enum ProducedBy { Other = 0, Crossover = 1, Mutation = 2, CrossoverAndMutation = 3, Move = 4 }; 30 30 31 31 [Item("SolutionInformation", "Stores meta-information about a solution.")] … … 35 35 public ProducedBy ProducedBy { get; set; } 36 36 [Storable] 37 public List<T> P arentList{ get; set; }37 public List<T> Predecessors { get; set; } 38 38 [Storable] 39 public int Generation { get; set; }39 public int Iteration { get; set; } 40 40 [Storable] 41 41 public ResultCollection InfoStore { get; set; } 42 42 43 43 public SolutionInformation() { 44 P arentList= new List<T>();44 Predecessors = new List<T>(); 45 45 InfoStore = new ResultCollection(); 46 46 } … … 51 51 : base(original, cloner) { 52 52 this.ProducedBy = original.ProducedBy; 53 this.P arentList = new List<T>(original.ParentList);54 this. Generation = original.Generation;53 this.Predecessors = new List<T>(original.Predecessors); 54 this.Iteration = original.Iteration; 55 55 this.InfoStore = (ResultCollection)original.InfoStore.Clone(cloner); 56 56 } … … 64 64 if (pi == null) return false; 65 65 66 if (ProducedBy == pi.ProducedBy && Generation == pi.Generation) {67 if (pi.P arentList == null && ParentList== null) return true;68 if (pi.P arentList != null && ParentList== null ||69 pi.P arentList == null && ParentList!= null) return false;70 if (pi.P arentList.Count != ParentList.Count) return false;66 if (ProducedBy == pi.ProducedBy && Iteration == pi.Iteration) { 67 if (pi.Predecessors == null && Predecessors == null) return true; 68 if (pi.Predecessors != null && Predecessors == null || 69 pi.Predecessors == null && Predecessors != null) return false; 70 if (pi.Predecessors.Count != Predecessors.Count) return false; 71 71 72 foreach (var p in P arentList) {73 if (!pi.P arentList.Contains(p)) return false;72 foreach (var p in Predecessors) { 73 if (!pi.Predecessors.Contains(p)) return false; 74 74 } 75 75 foreach (IResult info in InfoStore) {
Note: See TracChangeset
for help on using the changeset viewer.