Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/RealVectorToRealVectorEncoder.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Optimization;
    27 using HeuristicLab.Operators;
    2822using HeuristicLab.Core;
    2923using HeuristicLab.Data;
     24using HeuristicLab.Encodings.RealVectorEncoding;
     25using HeuristicLab.Operators;
    3026using HeuristicLab.Parameters;
    31 using HeuristicLab.Encodings.RealVectorEncoding;
    3227
    33 namespace HeuristicLab.Problems.TestFunctions
    34 {
    35     public class RealVectorToRealVectorEncoder : SingleSuccessorOperator, IRealVectorPSOEncoder, IRealVectorOperator
    36     {
    37       #region Parameters
     28namespace HeuristicLab.Problems.TestFunctions {
     29  public class RealVectorToRealVectorEncoder : SingleSuccessorOperator, IRealVectorPSOEncoder, IRealVectorOperator {
     30    #region Parameters
    3831
    39       public IParameter OriginalRealVectorParameter {
    40         get { return (IParameter)Parameters["OriginalRealVector"]; }
    41       }
     32    public IParameter OriginalRealVectorParameter {
     33      get { return (IParameter)Parameters["OriginalRealVector"]; }
     34    }
    4235
    43       public IParameter RealVectorParameter {
    44         get { return (IParameter)Parameters["RealVector"]; }
    45       }
     36    public IParameter RealVectorParameter {
     37      get { return (IParameter)Parameters["RealVector"]; }
     38    }
    4639
    47       public ILookupParameter<IntValue> LengthParameter {
    48         get { return (ILookupParameter<IntValue>)Parameters["Length"]; }
    49       }
     40    public ILookupParameter<IntValue> LengthParameter {
     41      get { return (ILookupParameter<IntValue>)Parameters["Length"]; }
     42    }
    5043
    51       public IValueLookupParameter<DoubleMatrix> BoundsParameter {
    52         get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
    53       }
     44    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
     45      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
     46    }
    5447
    55       protected ScopeParameter CurrentScopeParameter {
    56         get { return (ScopeParameter)Parameters["CurrentScope"]; }
    57       }
    58       #endregion
     48    protected ScopeParameter CurrentScopeParameter {
     49      get { return (ScopeParameter)Parameters["CurrentScope"]; }
     50    }
     51    #endregion
    5952
    60       public IScope CurrentScope {
    61         get { return CurrentScopeParameter.ActualValue; }
    62       }
     53    public IScope CurrentScope {
     54      get { return CurrentScopeParameter.ActualValue; }
     55    }
    6356
    64       public RealVectorToRealVectorEncoder() : base() {
    65         Parameters.Add(new LookupParameter<RealVector>("OriginalRealVector", "The original real vector."));
    66         Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting reference to the original real vector."));
    67         Parameters.Add(new LookupParameter<IntValue>("Length", "Vector length."));
    68         Parameters.Add(new ScopeParameter("CurrentScope", "The current scope bounds matrix should be cloned."));
    69         Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
    70       }
     57    public RealVectorToRealVectorEncoder()
     58      : base() {
     59      Parameters.Add(new LookupParameter<RealVector>("OriginalRealVector", "The original real vector."));
     60      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting reference to the original real vector."));
     61      Parameters.Add(new LookupParameter<IntValue>("Length", "Vector length."));
     62      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope bounds matrix should be cloned."));
     63      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
     64    }
    7165
    72       public override IOperation Apply() {
    73         RealVectorParameter.ActualValue = OriginalRealVectorParameter.ActualValue;
    74         IItem value = (IItem) BoundsParameter.ActualValue.Clone();
    75         CurrentScope.Variables.Add(new Variable("ParticleBounds", BoundsParameter.Description, value == null ? null : (IItem)value.Clone()));
    76         return base.Apply();
    77       }
     66    public override IOperation Apply() {
     67      RealVectorParameter.ActualValue = OriginalRealVectorParameter.ActualValue;
     68      IItem value = (IItem)BoundsParameter.ActualValue.Clone();
     69      CurrentScope.Variables.Add(new Variable("ParticleBounds", BoundsParameter.Description, value == null ? null : (IItem)value.Clone()));
     70      return base.Apply();
     71    }
    7872
    79       public override bool CanChangeName {
    80         get { return false; }
    81       }
     73    public override bool CanChangeName {
     74      get { return false; }
    8275    }
     76  }
    8377}
Note: See TracChangeset for help on using the changeset viewer.