Changeset 4068 for trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
r3376 r4068 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq;25 using System.Text;26 using HeuristicLab.Common;27 24 using HeuristicLab.Core; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;29 25 using HeuristicLab.Data; 30 26 using HeuristicLab.Parameters; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 28 32 29 namespace HeuristicLab.Encodings.BinaryVectorEncoding { … … 39 36 [Item("NPointCrossover", "N point crossover for binary vectors. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")] 40 37 [StorableClass] 41 public class NPointCrossover : BinaryVectorCrossover {38 public class NPointCrossover : BinaryVectorCrossover { 42 39 /// <summary> 43 40 /// Number of crossover points. … … 80 77 //choose break points 81 78 List<int> breakpointPool = new List<int>(); 82 79 83 80 for (int i = 0; i < length; i++) 84 81 breakpointPool.Add(i); … … 98 95 99 96 while (arrayIndex < length) { 100 if (breakPointIndex < breakpoints.Length && 97 if (breakPointIndex < breakpoints.Length && 101 98 arrayIndex == breakpoints[breakPointIndex]) { 102 99 breakPointIndex++;
Note: See TracChangeset
for help on using the changeset viewer.