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)

Location:
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/AverageCrossover.cs

    r3376 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2725
     
    5856          result[i] = avg / (double)parentsCount;
    5957        }
    60       } catch (IndexOutOfRangeException) {
     58      }
     59      catch (IndexOutOfRangeException) {
    6160        throw new ArgumentException("AverageCrossover: The parents' vectors are of different length.", "parents");
    6261      }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs

    r3907 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
     
    138137      if (QualityParameter.ActualValue == null || QualityParameter.ActualValue.Length != parents.Length) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + QualityParameter.ActualName + " could not be found, or not in the same quantity as there are parents.");
    139138      if (AlphaParameter.ActualValue == null || BetaParameter.ActualValue == null) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + AlphaParameter.ActualName + " or paramter " + BetaParameter.ActualName + " could not be found.");
    140      
     139
    141140      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
    142141      bool maximization = MaximizationParameter.ActualValue.Value;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaCrossover.cs

    r3909 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs

    r3376 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    26 using HeuristicLab.Parameters;
    2724using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2825
     
    4845    public static RealVector Apply(IRandom random, ItemArray<RealVector> parents) {
    4946      int length = parents[0].Length;
    50      
    51       for (int i = 0; i < parents.Length; i++) { 
    52         if(parents[i].Length != length)
     47
     48      for (int i = 0; i < parents.Length; i++) {
     49        if (parents[i].Length != length)
    5350          throw new ArgumentException("DiscreteCrossover: The parents' vectors are of different length.", "parents");
    5451      }
    55      
     52
    5653      RealVector result = new RealVector(length);
    5754      for (int i = 0; i < length; i++) {
    5855        result[i] = parents[random.Next(parents.Length)][i];
    59       }       
    60      
     56      }
     57
    6158      return result;
    6259    }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/HeuristicCrossover.cs

    r3659 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
     
    7271      if (betterParent.Length != worseParent.Length)
    7372        throw new ArgumentException("HeuristicCrossover: the two parents are not of the same length");
    74      
     73
    7574      int length = betterParent.Length;
    7675      double[] result = new double[length];
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/LocalCrossover.cs

    r3376 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2725
     
    4745      if (parent1.Length != parent2.Length)
    4846        throw new ArgumentException("LocalCrossover: the two parents are not of the same length");
    49      
     47
    5048      double factor;
    5149      int length = parent1.Length;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/RandomConvexCrossover.cs

    r3376 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2725
     
    4745      if (parent1.Length != parent2.Length)
    4846        throw new ArgumentException("ERROR in RandomConvexCrossover: the two parents are not of the same length");
    49      
     47
    5048      int length = parent1.Length;
    5149      double[] result = new double[length];
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SimulatedBinaryCrossover.cs

    r3376 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs

    r3675 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2725
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs

    r3909 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
     
    8281    /// <returns>The vector resulting from the crossover.</returns>
    8382    protected override RealVector Cross(IRandom random, ItemArray<RealVector> parents) {
    84       if (parents.Length != 2) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: There must be exactly two parents.", "parents");
     83      if (parents.Length != 2) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: There must be exactly two parents.", "parents");
    8584      if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformAllPositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
    8685      return Apply(random, parents[0], parents[1], AlphaParameter.ActualValue);
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs

    r3909 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
     
    7473      if (alpha.Value < 0 || alpha.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter alpha must be in the range [0;1]", "alpha");
    7574      if (probability.Value < 0 || probability.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter probability must be in the range [0;1]", "probability");
    76      
     75
    7776      RealVector result = new RealVector(length);
    7877      for (int i = 0; i < length; i++) {
     
    9291    /// <param name="parents">The collection of parents (must be of size 2).</param>
    9392    /// <returns>The vector resulting from the crossover.</returns>
    94     protected override RealVector  Cross(IRandom random, ItemArray<RealVector> parents) {
     93    protected override RealVector Cross(IRandom random, ItemArray<RealVector> parents) {
    9594      if (parents.Length != 2) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: There must be exactly two parents.", "parents");
    9695      if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformSomePositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
Note: See TracChangeset for help on using the changeset viewer.