Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/15/17 14:25:44 (7 years ago)
Author:
abeham
Message:

#2457: merged trunk into branch

Location:
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding
Files:
6 deleted
6 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding

  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj

    r14776 r15256  
    155155    <Compile Include="Crossovers\SinglePointCrossover.cs" />
    156156    <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" />
     157    <Compile Include="Interfaces\ILinearLinkageEMSSMoveOperator.cs" />
    157158    <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" />
    158159    <Compile Include="Interfaces\ILinearLinkageCreator.cs" />
     
    167168    <Compile Include="Manipulators\MergeGroupManipulator.cs" />
    168169    <Compile Include="Manipulators\MultiLLEManipulator.cs" />
    169     <Compile Include="Moves\ExtractMove.cs" />
    170     <Compile Include="Moves\MergeMove.cs" />
    171     <Compile Include="Moves\Move.cs" />
    172     <Compile Include="Moves\ShiftMove.cs" />
    173     <Compile Include="Moves\SplitMove.cs" />
    174     <Compile Include="Moves\StaticAPI\MoveGenerator.cs" />
     170    <Compile Include="Moves\EMSS\EMSSMoveMaker.cs" />
     171    <Compile Include="Moves\EMSS\ExtractMove.cs" />
     172    <Compile Include="Moves\EMSS\MergeMove.cs" />
     173    <Compile Include="Moves\EMSS\EMSSMove.cs" />
     174    <Compile Include="Moves\EMSS\ExhaustiveEMSSMoveGenerator.cs" />
     175    <Compile Include="Moves\EMSS\EMSSMoveGenerator.cs" />
     176    <Compile Include="Moves\EMSS\StochasticEMSSMultiMoveGenerator.cs" />
     177    <Compile Include="Moves\EMSS\StochasticEMSSSingleMoveGenerator.cs" />
     178    <Compile Include="Moves\EMSS\ShiftMove.cs" />
     179    <Compile Include="Moves\EMSS\SplitMove.cs" />
    175180    <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" />
    176181    <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" />
  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs

    r14659 r15256  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
     24using HeuristicLab.PluginInfrastructure;
    2325
    2426namespace HeuristicLab.Encodings.LinearLinkageEncoding {
     27  [NonDiscoverableType]
    2528  public class LinearLinkageEqualityComparer : EqualityComparer<LinearLinkage> {
    2629    public override bool Equals(LinearLinkage x, LinearLinkage y) {
    27       if (x == null && y == null) return true;
     30      if (ReferenceEquals(x, y)) return true;
    2831      if (x == null || y == null) return false;
    2932      if (x.Length != y.Length) return false;
     
    3437
    3538    public override int GetHashCode(LinearLinkage obj) {
     39      if (obj == null) throw new ArgumentNullException("obj", "LinearLinkageEqualityComparer: Cannot compute hash value of null.");
    3640      unchecked {
    3741        int hash = 17;
  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/ExhaustiveSwap2MoveGenerator.cs

    r14185 r15256  
    2929
    3030namespace HeuristicLab.Encodings.LinearLinkageEncoding {
    31   [Item("ExhaustiveSwap2MoveGenerator", "Generates all possible swap-2 moves from a given permutation.")]
     31  [Item("ExhaustiveSwap2MoveGenerator", "Generates all possible swap-2 moves from a given lle grouping.")]
    3232  [StorableClass]
    3333  public class ExhaustiveSwap2MoveGenerator : Swap2MoveGenerator, IExhaustiveMoveGenerator {
  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/StochasticSwap2SingleMoveGenerator.cs

    r14185 r15256  
    2929
    3030namespace HeuristicLab.Encodings.LinearLinkageEncoding {
    31   [Item("StochasticSwap2SingleMoveGenerator", "Randomly samples a single from all possible swap-2 moves from a given grouping.")]
     31  [Item("StochasticSwap2SingleMoveGenerator", "Randomly samples a single from all possible swap-2 moves from a given lle grouping.")]
    3232  [StorableClass]
    3333  public class StochasticSwap2SingleMoveGenerator : Swap2MoveGenerator, IStochasticOperator, ISingleMoveGenerator {
  • branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs

    r14659 r15256  
    3030  [StorableClass]
    3131  public sealed class HammingSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
    32 
    33     protected override bool IsCommutative {
    34       get { return true; }
    35     }
     32    protected override bool IsCommutative { get { return true; } }
    3633
    3734    [StorableConstructor]
    3835    private HammingSimilarityCalculator(bool deserializing) : base(deserializing) { }
    3936    private HammingSimilarityCalculator(HammingSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
    40     public HammingSimilarityCalculator() { }
     37    public HammingSimilarityCalculator() : base() { }
    4138
    4239    public override IDeepCloneable Clone(Cloner cloner) {
     
    4542
    4643    public static double CalculateSimilarity(LinearLinkage left, LinearLinkage right) {
    47       if (left.Length != right.Length) throw new ArgumentException("Comparing encodings of unequal length");
     44      if (left == null || right == null)
     45        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
     46      if (left.Length != right.Length)
     47        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
     48      if (left.Length == 0)
     49        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
     50      if (ReferenceEquals(left, right)) return 1.0;
     51
    4852      var similarity = 0;
    4953      for (var i = 0; i < left.Length; i++) {
Note: See TracChangeset for help on using the changeset viewer.