- Timestamp:
- 03/09/11 12:42:41 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
r5592 r5643 50 50 get { return (ILookupParameter<RealVector>)Parameters["NeighborBest"]; } 51 51 } 52 public LookupParameter<RealVector> Best PointParameter {53 get { return (LookupParameter<RealVector>)Parameters["Best Point"]; }52 public LookupParameter<RealVector> BestRealVectorParameter { 53 get { return (LookupParameter<RealVector>)Parameters["BestRealVector"]; } 54 54 } 55 55 public ILookupParameter<RealVector> RealVectorParameter { … … 85 85 } 86 86 protected RealVector BestPoint { 87 get { return Best PointParameter.ActualValue; }87 get { return BestRealVectorParameter.ActualValue; } 88 88 } 89 89 protected RealVector RealVector { … … 121 121 Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity.")); 122 122 Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution.")); 123 Parameters.Add(new LookupParameter<RealVector>("Best Point", "Global best position."));123 Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best position.")); 124 124 Parameters.Add(new LookupParameter<RealVector>("NeighborBest", "Best neighboring solution.")); 125 125 Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem.")); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
r5592 r5643 63 63 get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; } 64 64 } 65 public ILookupParameter<RealVector> Best PointParameter {66 get { return (ILookupParameter<RealVector>)Parameters["Best Point"]; }65 public ILookupParameter<RealVector> BestRealVectorParameter { 66 get { return (ILookupParameter<RealVector>)Parameters["BestRealVector"]; } 67 67 } 68 68 public IScopeTreeLookupParameter<IntArray> NeighborsParameter { … … 82 82 set { BestQualityParameter.ActualValue = value; } 83 83 } 84 private RealVector Best Point{85 get { return Best PointParameter.ActualValue; }86 set { Best PointParameter.ActualValue = value; }84 private RealVector BestRealVector { 85 get { return BestRealVectorParameter.ActualValue; } 86 set { BestRealVectorParameter.ActualValue = value; } 87 87 } 88 88 private ItemArray<DoubleValue> Quality { … … 131 131 : base() { 132 132 Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Overall best quality.")); 133 Parameters.Add(new LookupParameter<RealVector>("Best Point", "Global best particle position"));133 Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best particle position")); 134 134 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "Particle's quality")); 135 135 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("PersonalBestQuality", "Particle's personal best quality")); … … 161 161 BestQuality = new DoubleValue(); 162 162 BestQuality.Value = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value); 163 Best Point= (RealVector)RealVector[Quality.FindIndex(v => v.Value == BestQuality.Value)].Clone();163 BestRealVector = (RealVector)RealVector[Quality.FindIndex(v => v.Value == BestQuality.Value)].Clone(); 164 164 } 165 165
Note: See TracChangeset
for help on using the changeset viewer.