- Timestamp:
- 11/24/15 17:22:41 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Encodings.LinearLinkageEncoding/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Interfaces/ILinearLinkageCreator.cs
r12285 r13372 25 25 26 26 namespace HeuristicLab.Encodings.LinearLinkageEncoding { 27 public interface ILinearLinkageCreator : ISolutionCreator , ILinearLinkageOperator {27 public interface ILinearLinkageCreator : ISolutionCreator<LinearLinkage>, ILinearLinkageOperator { 28 28 IValueLookupParameter<IntValue> LengthParameter { get; } 29 29 ILookupParameter<LinearLinkage> LLEParameter { get; } -
branches/ProblemRefactoring/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkage.cs
r12701 r13372 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 … … 31 32 [Item("LinearLinkage", "Represents an LLE grouping of items.")] 32 33 [StorableClass] 33 public sealed class LinearLinkage : IntArray {34 public sealed class LinearLinkage : IntArray, ISolution { 34 35 35 36 [StorableConstructor] -
branches/ProblemRefactoring/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkageEncoding.cs
r12650 r13372 34 34 [Item("Linear Linkage Encoding", "Describes a linear linkage (LLE) encoding.")] 35 35 [StorableClass] 36 public sealed class LinearLinkageEncoding : Encoding< ILinearLinkageCreator> {36 public sealed class LinearLinkageEncoding : Encoding<LinearLinkage> { 37 37 #region encoding parameters 38 38 [Storable] … … 166 166 } 167 167 #endregion 168 }169 168 170 public static class IndividualExtensionMethods {171 public static LinearLinkage LinearLinkage(this Individual individual) {172 var encoding = individual.GetEncoding<LinearLinkageEncoding>();173 return individual.LinearLinkage(encoding.Name);174 }175 public static LinearLinkage LinearLinkage(this Individual individual, string name) {176 return (LinearLinkage)individual[name];177 }178 169 } 179 170 }
Note: See TracChangeset
for help on using the changeset viewer.