- Timestamp:
- 07/19/10 13:01:33 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Selection/3.3
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/HeuristicLab.Selection-3.3.csproj
r3832 r4043 84 84 <Compile Include="BestSelector.cs" /> 85 85 <Compile Include="ConditionalSelector.cs" /> 86 <Compile Include="LeftSelector.cs" /> 86 87 <Compile Include="RandomReplacer.cs" /> 87 88 <Compile Include="GenderSpecificSelector.cs" /> … … 89 90 <Compile Include="Replacer.cs" /> 90 91 <Compile Include="RightChildReducer.cs" /> 92 <Compile Include="RightSelector.cs" /> 91 93 <Compile Include="SingleObjectiveSelector.cs" /> 92 94 <Compile Include="LeftReducer.cs" /> -
trunk/sources/HeuristicLab.Selection/3.3/LeftSelector.cs
r3095 r4043 22 22 using System.Collections.Generic; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 24 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 27 … … 30 32 [Item("LeftSelector", "An operator which selects sub-scopes from left to right.")] 31 33 [StorableClass] 32 [Creatable("Test")]33 34 public sealed class LeftSelector : Selector { 34 public LeftSelector() : base() { } 35 private ValueParameter<BoolValue> CopySelectedParameter { 36 get { return (ValueParameter<BoolValue>)Parameters["CopySelected"]; } 37 } 38 public IValueLookupParameter<IntValue> NumberOfSelectedSubScopesParameter { 39 get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfSelectedSubScopes"]; } 40 } 41 42 public BoolValue CopySelected { 43 get { return CopySelectedParameter.Value; } 44 set { CopySelectedParameter.Value = value; } 45 } 46 47 public LeftSelector() 48 : base() { 49 Parameters.Add(new ValueParameter<BoolValue>("CopySelected", "True if the selected sub-scopes should be copied, otherwise false.", new BoolValue(true))); 50 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSelectedSubScopes", "The number of sub-scopes which should be selected.")); 51 } 35 52 36 53 protected override IScope[] Select(List<IScope> scopes) { -
trunk/sources/HeuristicLab.Selection/3.3/RightSelector.cs
r3095 r4043 22 22 using System.Collections.Generic; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 24 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 27 … … 30 32 [Item("RightSelector", "An operator which selects sub-scopes from right to left.")] 31 33 [StorableClass] 32 [Creatable("Test")]33 34 public sealed class RightSelector : Selector { 34 public RightSelector() : base() { } 35 private ValueParameter<BoolValue> CopySelectedParameter { 36 get { return (ValueParameter<BoolValue>)Parameters["CopySelected"]; } 37 } 38 public IValueLookupParameter<IntValue> NumberOfSelectedSubScopesParameter { 39 get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfSelectedSubScopes"]; } 40 } 41 42 public BoolValue CopySelected { 43 get { return CopySelectedParameter.Value; } 44 set { CopySelectedParameter.Value = value; } 45 } 46 public RightSelector() 47 : base() { 48 Parameters.Add(new ValueParameter<BoolValue>("CopySelected", "True if the selected sub-scopes should be copied, otherwise false.", new BoolValue(true))); 49 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSelectedSubScopes", "The number of sub-scopes which should be selected.")); 50 } 35 51 36 52 protected override IScope[] Select(List<IScope> scopes) {
Note: See TracChangeset
for help on using the changeset viewer.