Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/04/11 21:34:45 (13 years ago)
Author:
abeham
Message:

#852

  • Made public properties that redirect to ActualValue.Value private or protected
  • Sealed all of the specific operators
  • Removed files that are present in the repository, but are not included in the project
  • Removed .sln file (is this still needed?)
  • Added license headers to some files
  • Unified the pattern for writing the constructors similar to other files in the trunk
  • Corrected assembly and plugin version from 3.3.0.x to 3.3.2.x
  • Fixed the wiring in the VelocityBoundsModifier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.cs

    r5410 r5435  
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29
    2930namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
    30 
     31  [Item("TopologyInitializer", "Groups the particles into neighborhoods according to a certain strategy.")]
    3132  [StorableClass]
    3233  public abstract class TopologyInitializer : SingleSuccessorOperator, ITopologyInitializer {
     34    public override bool CanChangeName {
     35      get { return false; }
     36    }
    3337
    3438    #region Parameters
     
    4347
    4448    #region Parameter Values
    45     public ItemArray<IntegerVector> Neighbors {
     49    protected ItemArray<IntegerVector> Neighbors {
    4650      get { return NeighborsParameter.ActualValue; }
    4751      set { NeighborsParameter.ActualValue = value; }
    4852    }
    49     public int SwarmSize {
     53    protected int SwarmSize {
    5054      get { return SwarmSizeParameter.ActualValue.Value; }
    5155    }
     
    5357
    5458    #region Construction & Cloning
    55     protected TopologyInitializer() {
     59    [StorableConstructor]
     60    protected TopologyInitializer(bool deserializing) : base(deserializing) { }
     61    protected TopologyInitializer(TopologyInitializer original, Cloner cloner) : base(original, cloner) { }
     62    public TopologyInitializer() {
    5663      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Neighbors", "The list of neighbors for each particle."));
    5764      Parameters.Add(new LookupParameter<IntValue>("SwarmSize", "Number of particles in the swarm."));
    58     }
    59     [StorableConstructor]
    60     protected TopologyInitializer(bool deserializing) : base(deserializing) { }
    61     protected TopologyInitializer(TopologyInitializer original, Cloner cloner)
    62       : base(original, cloner) {
    6365    }
    6466    #endregion
Note: See TracChangeset for help on using the changeset viewer.