Changeset 5568 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs
- Timestamp:
- 02/28/11 17:25:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs
r5560 r5568 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Optimization;26 26 27 27 namespace HeuristicLab.Encodings.RealVectorEncoding { … … 51 51 double omega = Inertia.Value; 52 52 double phi_p = PersonalBestAttraction.Value; 53 double phi_g = Neighbor sBestAttraction.Value;53 double phi_g = NeighborBestAttraction.Value; 54 54 for (int i = 0; i < velocity.Length; i++) { 55 55 velocity[i] = 56 56 Velocity[i] * omega + 57 57 (PersonalBest[i] - RealVector[i]) * phi_p * r_p + 58 ( NeighborsBest[i] - RealVector[i]) * phi_g * r_g;58 (BestPoint[i] - RealVector[i]) * phi_g * r_g; 59 59 } 60 60 BoundsChecker.Apply(velocity, VelocityBounds);
Note: See TracChangeset
for help on using the changeset viewer.