Changeset 15217 for stable/HeuristicLab.Encodings.LinearLinkageEncoding
- Timestamp:
- 07/12/17 21:02:01 (7 years ago)
- Location:
- stable
- Files:
-
- 7 deleted
- 6 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14412,14475-14476,14659-14660,14663,14912,15050,15067,15069,15079,15162,15166,15172-15173
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj
r14663 r15217 165 165 <Compile Include="Crossovers\SinglePointCrossover.cs" /> 166 166 <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" /> 167 <Compile Include="Interfaces\ILinearLinkageEMSSMoveOperator.cs" /> 167 168 <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" /> 168 169 <Compile Include="Interfaces\ILinearLinkageCreator.cs" /> … … 177 178 <Compile Include="Manipulators\MergeGroupManipulator.cs" /> 178 179 <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" /> 185 190 <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" /> 186 191 <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" /> -
stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs
r14659 r15217 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 24 using HeuristicLab.PluginInfrastructure; 23 25 24 26 namespace HeuristicLab.Encodings.LinearLinkageEncoding { 27 [NonDiscoverableType] 25 28 public class LinearLinkageEqualityComparer : EqualityComparer<LinearLinkage> { 26 29 public override bool Equals(LinearLinkage x, LinearLinkage y) { 27 if ( x == null && y == null) return true;30 if (ReferenceEquals(x, y)) return true; 28 31 if (x == null || y == null) return false; 29 32 if (x.Length != y.Length) return false; … … 34 37 35 38 public override int GetHashCode(LinearLinkage obj) { 39 if (obj == null) throw new ArgumentNullException("obj", "LinearLinkageEqualityComparer: Cannot compute hash value of null."); 36 40 unchecked { 37 41 int hash = 17; -
stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/ExhaustiveSwap2MoveGenerator.cs
r14185 r15217 29 29 30 30 namespace 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.")] 32 32 [StorableClass] 33 33 public class ExhaustiveSwap2MoveGenerator : Swap2MoveGenerator, IExhaustiveMoveGenerator { -
stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/StochasticSwap2SingleMoveGenerator.cs
r14185 r15217 29 29 30 30 namespace 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.")] 32 32 [StorableClass] 33 33 public class StochasticSwap2SingleMoveGenerator : Swap2MoveGenerator, IStochasticOperator, ISingleMoveGenerator { -
stable/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs
r14659 r15217 30 30 [StorableClass] 31 31 public sealed class HammingSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 32 33 protected override bool IsCommutative { 34 get { return true; } 35 } 32 protected override bool IsCommutative { get { return true; } } 36 33 37 34 [StorableConstructor] 38 35 private HammingSimilarityCalculator(bool deserializing) : base(deserializing) { } 39 36 private HammingSimilarityCalculator(HammingSimilarityCalculator original, Cloner cloner) : base(original, cloner) { } 40 public HammingSimilarityCalculator() { }37 public HammingSimilarityCalculator() : base() { } 41 38 42 39 public override IDeepCloneable Clone(Cloner cloner) { … … 45 42 46 43 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 48 52 var similarity = 0; 49 53 for (var i = 0; i < left.Length; i++) {
Note: See TracChangeset
for help on using the changeset viewer.