- Timestamp:
- 11/24/15 16:42:09 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVector.cs
r12012 r13364 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 … … 29 30 [StorableClass] 30 31 [Item("IntegerVector", "Represents a vector of integer values.")] 31 public class IntegerVector : IntArray {32 public class IntegerVector : IntArray, ISolution { 32 33 [StorableConstructor] 33 34 protected IntegerVector(bool deserializing) : base(deserializing) { } -
branches/ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEncoding.cs
r12837 r13364 34 34 [Item("IntegerVectorEncoding", "Describes an integer vector encoding.")] 35 35 [StorableClass] 36 public sealed class IntegerVectorEncoding : Encoding<I IntegerVectorCreator> {36 public sealed class IntegerVectorEncoding : Encoding<IntegerVector> { 37 37 #region Encoding Parameters 38 38 [Storable] … … 271 271 #endregion 272 272 } 273 274 public static class IndividualExtensionMethods {275 public static IntegerVector IntegerVector(this Individual individual) {276 var encoding = individual.GetEncoding<IntegerVectorEncoding>();277 return individual.IntegerVector(encoding.Name);278 }279 public static IntegerVector IntegerVector(this Individual individual, string name) {280 return (IntegerVector)individual[name];281 }282 }283 273 } -
branches/ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCreator.cs
r12012 r13364 28 28 /// An interface which represents an operator for creating vectors of int-valued data. 29 29 /// </summary> 30 public interface IIntegerVectorCreator : ISolutionCreator , IBoundedIntegerVectorOperator {30 public interface IIntegerVectorCreator : ISolutionCreator<IntegerVector>, IBoundedIntegerVectorOperator { 31 31 IValueLookupParameter<IntValue> LengthParameter { get; } 32 32 ILookupParameter<IntegerVector> IntegerVectorParameter { get; }
Note: See TracChangeset
for help on using the changeset viewer.