Changeset 5560 for trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs
- Timestamp:
- 02/24/11 17:08:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs
r5445 r5560 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.IntegerVectorEncoding;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Data; 26 26 27 27 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization { … … 43 43 44 44 public override IOperation Apply() { 45 ItemArray<Int egerVector> neighbors = new ItemArray<IntegerVector>(SwarmSize);45 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(SwarmSize); 46 46 for (int i = 0; i < SwarmSize; i++) { 47 neighbors[i] = new Int egerVector(new[] { (SwarmSize + i - 1) % SwarmSize, (i + 1) % SwarmSize });47 neighbors[i] = new IntArray(new[] { (SwarmSize + i - 1) % SwarmSize, (i + 1) % SwarmSize }); 48 48 } 49 49 Neighbors = neighbors;
Note: See TracChangeset
for help on using the changeset viewer.