- Timestamp:
- 07/15/17 14:25:44 (7 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding
- Files:
-
- 6 deleted
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding
-
Property
svn:mergeinfo
set to
/trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding merged eligible
-
Property
svn:mergeinfo
set to
-
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj
r14776 r15256 155 155 <Compile Include="Crossovers\SinglePointCrossover.cs" /> 156 156 <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" /> 157 <Compile Include="Interfaces\ILinearLinkageEMSSMoveOperator.cs" /> 157 158 <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" /> 158 159 <Compile Include="Interfaces\ILinearLinkageCreator.cs" /> … … 167 168 <Compile Include="Manipulators\MergeGroupManipulator.cs" /> 168 169 <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" /> 175 180 <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" /> 176 181 <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" /> -
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs
r14659 r15256 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; -
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/ExhaustiveSwap2MoveGenerator.cs
r14185 r15256 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 { -
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/Moves/Swap/StochasticSwap2SingleMoveGenerator.cs
r14185 r15256 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 { -
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs
r14659 r15256 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.