Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/12/17 21:02:01 (7 years ago)
Author:
abeham
Message:

#2666, #2706, #2730, #2736: merged revisions 14412, 14475, 14476, 14659, 14660, 14663, 14779, 14780, 14912, 15050, 15067, 15069, 15079, 15162, 15166, 15172, 15173 to stable

Location:
stable
Files:
6 deleted
6 edited
3 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj

    r14663 r15217  
    165165    <Compile Include="Crossovers\SinglePointCrossover.cs" />
    166166    <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" />
     167    <Compile Include="Interfaces\ILinearLinkageEMSSMoveOperator.cs" />
    167168    <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" />
    168169    <Compile Include="Interfaces\ILinearLinkageCreator.cs" />
     
    177178    <Compile Include="Manipulators\MergeGroupManipulator.cs" />
    178179    <Compile Include="Manipulators\MultiLLEManipulator.cs" />
    179     <Compile Include="Moves\ExtractMove.cs" />
    180     <Compile Include="Moves\MergeMove.cs" />
    181     <Compile Include="Moves\Move.cs" />
    182     <Compile Include="Moves\ShiftMove.cs" />
    183     <Compile Include="Moves\SplitMove.cs" />
    184     <Compile Include="Moves\StaticAPI\MoveGenerator.cs" />
     180    <Compile Include="Moves\EMSS\EMSSMoveMaker.cs" />
     181    <Compile Include="Moves\EMSS\ExtractMove.cs" />
     182    <Compile Include="Moves\EMSS\MergeMove.cs" />
     183    <Compile Include="Moves\EMSS\EMSSMove.cs" />
     184    <Compile Include="Moves\EMSS\ExhaustiveEMSSMoveGenerator.cs" />
     185    <Compile Include="Moves\EMSS\EMSSMoveGenerator.cs" />
     186    <Compile Include="Moves\EMSS\StochasticEMSSMultiMoveGenerator.cs" />
     187    <Compile Include="Moves\EMSS\StochasticEMSSSingleMoveGenerator.cs" />
     188    <Compile Include="Moves\EMSS\ShiftMove.cs" />
     189    <Compile Include="Moves\EMSS\SplitMove.cs" />
    185190    <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" />
    186191    <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" />
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs

    r14659 r15217  
    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;
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/ExhaustiveSwap2MoveGenerator.cs

    r14185 r15217  
    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 {
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/StochasticSwap2SingleMoveGenerator.cs

    r14185 r15217  
    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 {
  • stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs

    r14659 r15217  
    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.