Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/24/11 17:08:11 (13 years ago)
Author:
mkofler
Message:

#852: Code refactoring. Created new interfaces and moved operators to respective projects as suggested in A. Beham's review. Work in progress.

File:
1 edited

Legend:

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

    r5445 r5560  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
    25 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2625using HeuristicLab.Operators;
     26using HeuristicLab.Optimization;
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3737
    3838    #region Parameters
    39     public IScopeTreeLookupParameter<IntegerVector> NeighborsParameter {
    40       get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Neighbors"]; }
     39    public IScopeTreeLookupParameter<IntArray> NeighborsParameter {
     40      get { return (IScopeTreeLookupParameter<IntArray>)Parameters["Neighbors"]; }
    4141    }
     42
    4243    public ILookupParameter<IntValue> SwarmSizeParameter {
    4344      get { return (ILookupParameter<IntValue>)Parameters["SwarmSize"]; }
     
    4748
    4849    #region Parameter Values
    49     protected ItemArray<IntegerVector> Neighbors {
     50    protected ItemArray<IntArray> Neighbors {
    5051      get { return NeighborsParameter.ActualValue; }
    5152      set { NeighborsParameter.ActualValue = value; }
     
    6061    protected TopologyInitializer(bool deserializing) : base(deserializing) { }
    6162    protected TopologyInitializer(TopologyInitializer original, Cloner cloner) : base(original, cloner) { }
     63   
    6264    public TopologyInitializer() {
    63       Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Neighbors", "The list of neighbors for each particle."));
     65      Parameters.Add(new ScopeTreeLookupParameter<IntArray>("Neighbors", "The list of neighbors for each particle."));
    6466      Parameters.Add(new LookupParameter<IntValue>("SwarmSize", "Number of particles in the swarm."));
    6567    }
    6668    #endregion
    67 
    6869  }
    6970
Note: See TracChangeset for help on using the changeset viewer.