Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 14:42:48 (9 years ago)
Author:
mkommend
Message:

#2174: Distributed files in programmable problem branch to the correct plugins.

Location:
branches/ProgrammableProblem/HeuristicLab.Encodings.IntegerVectorEncoding/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj

    r11778 r11949  
    169169    </Compile>
    170170    <Compile Include="Crossovers\RoundedUniformArithmeticCrossover.cs" />
     171    <Compile Include="IntegerVectorEncoding.cs" />
    171172    <Compile Include="IntegerVectorOperator.cs" />
    172173    <Compile Include="Interfaces\IBoundedIntegerVectorOperator.cs" />
  • branches/ProgrammableProblem/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEncoding.cs

    r11945 r11949  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2928using HeuristicLab.Optimization;
    3029using HeuristicLab.Parameters;
     
    3231using HeuristicLab.PluginInfrastructure;
    3332
    34 namespace HeuristicLab.Problems.Programmable {
     33namespace HeuristicLab.Encodings.IntegerVectorEncoding {
    3534  [Item("IntegerVectorEncoding", "Describes an integer vector encoding.")]
    3635  [StorableClass]
     
    270269    #endregion
    271270  }
     271
     272  public static class IndividualExtensionMethods {
     273    public static IntegerVector IntegerVector(this Individual individual) {
     274      var encoding = individual.GetEncoding<IntegerVectorEncoding>();
     275      return individual.IntegerVector(encoding.Name);
     276    }
     277    public static IntegerVector IntegerVector(this Individual individual, string name) {
     278      return (IntegerVector)individual[name];
     279    }
     280  }
    272281}
Note: See TracChangeset for help on using the changeset viewer.