Changeset 12326
- Timestamp:
- 04/17/15 19:23:51 (10 years ago)
- Location:
- branches/OptimizationNetworks/HeuristicLab.Networks/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks/3.3/FeatureSelection Network/SelectionProblem.cs
r12323 r12326 7 7 using HeuristicLab.Parameters; 8 8 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 9 using HeuristicLab.Problems.Binary; 9 10 10 11 namespace HeuristicLab.Networks.FeatureSelection_Network { 11 public class SelectionProblem : SingleObjectiveBasicProblem<BinaryVectorEncoding>{12 public class SelectionProblem : BinaryProblem { 12 13 private Func<BinaryVector, double> eval; 13 14 public virtual int Length {15 get { return Encoding.Length; }16 set { Encoding.Length = value; }17 }18 14 19 15 protected SelectionProblem(SelectionProblem original, Cloner cloner) … … 30 26 31 27 var lengthParam = new ValueParameter<IntValue>("Length"); 28 29 32 30 lengthParam.ValueChanged += (o, s) => { Length = lengthParam.Value.Value; }; 31 // we cannot use the fixed value parameter from BinaryProblem in the network 32 Parameters.Remove("Length"); 33 33 Parameters.Add(lengthParam); 34 34 } … … 38 38 } 39 39 40 public override double Evaluate(Individual individual, IRandom random) { 41 return eval(individual.BinaryVector()); 40 public override double Evaluate(BinaryVector vector, IRandom random) { 41 return eval(vector); 42 42 43 } 43 44 -
branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj
r12324 r12326 145 145 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 146 146 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 147 <Private>False</Private> 148 </Reference> 149 <Reference Include="HeuristicLab.Problems.Binary-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 150 <SpecificVersion>False</SpecificVersion> 151 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Binary-3.3.dll</HintPath> 147 152 <Private>False</Private> 148 153 </Reference>
Note: See TracChangeset
for help on using the changeset viewer.