Changeset 5560 for trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.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/TopologyInitializer.cs
r5445 r5560 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.IntegerVectorEncoding;26 25 using HeuristicLab.Operators; 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 37 37 38 38 #region Parameters 39 public IScopeTreeLookupParameter<Int egerVector> NeighborsParameter {40 get { return (IScopeTreeLookupParameter<Int egerVector>)Parameters["Neighbors"]; }39 public IScopeTreeLookupParameter<IntArray> NeighborsParameter { 40 get { return (IScopeTreeLookupParameter<IntArray>)Parameters["Neighbors"]; } 41 41 } 42 42 43 public ILookupParameter<IntValue> SwarmSizeParameter { 43 44 get { return (ILookupParameter<IntValue>)Parameters["SwarmSize"]; } … … 47 48 48 49 #region Parameter Values 49 protected ItemArray<Int egerVector> Neighbors {50 protected ItemArray<IntArray> Neighbors { 50 51 get { return NeighborsParameter.ActualValue; } 51 52 set { NeighborsParameter.ActualValue = value; } … … 60 61 protected TopologyInitializer(bool deserializing) : base(deserializing) { } 61 62 protected TopologyInitializer(TopologyInitializer original, Cloner cloner) : base(original, cloner) { } 63 62 64 public TopologyInitializer() { 63 Parameters.Add(new ScopeTreeLookupParameter<Int egerVector>("Neighbors", "The list of neighbors for each particle."));65 Parameters.Add(new ScopeTreeLookupParameter<IntArray>("Neighbors", "The list of neighbors for each particle.")); 64 66 Parameters.Add(new LookupParameter<IntValue>("SwarmSize", "Number of particles in the swarm.")); 65 67 } 66 68 #endregion 67 68 69 } 69 70
Note: See TracChangeset
for help on using the changeset viewer.