Changeset 3048 for trunk/sources/HeuristicLab.Selection
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Selection/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/LinearRankSelector.cs
r3017 r3048 44 44 IRandom random = RandomParameter.ActualValue; 45 45 bool maximization = MaximizationParameter.ActualValue.Value; 46 ItemArray<Double Data> qualities = QualityParameter.ActualValue;46 ItemArray<DoubleValue> qualities = QualityParameter.ActualValue; 47 47 IScope[] selected = new IScope[count]; 48 48 -
trunk/sources/HeuristicLab.Selection/3.3/ProportionalSelector.cs
r3017 r3048 36 36 [Creatable("Test")] 37 37 public sealed class ProportionalSelector : StochasticSingleObjectiveSelector { 38 private ValueParameter<Bool Data> WindowingParameter {39 get { return (ValueParameter<Bool Data>)Parameters["Windowing"]; }38 private ValueParameter<BoolValue> WindowingParameter { 39 get { return (ValueParameter<BoolValue>)Parameters["Windowing"]; } 40 40 } 41 41 42 public Bool DataWindowing {42 public BoolValue Windowing { 43 43 get { return WindowingParameter.Value; } 44 44 set { WindowingParameter.Value = value; } … … 47 47 public ProportionalSelector() 48 48 : base() { 49 Parameters.Add(new ValueParameter<Bool Data>("Windowing", "Apply windowing strategy (selection probability is proportional to the quality differences and not to the total quality).", new BoolData(true)));49 Parameters.Add(new ValueParameter<BoolValue>("Windowing", "Apply windowing strategy (selection probability is proportional to the quality differences and not to the total quality).", new BoolValue(true))); 50 50 CopySelected.Value = true; 51 51 } -
trunk/sources/HeuristicLab.Selection/3.3/Selector.cs
r3034 r3048 39 39 } 40 40 41 protected ValueParameter<Bool Data> CopySelectedParameter {42 get { return (ValueParameter<Bool Data>)Parameters["CopySelected"]; }41 protected ValueParameter<BoolValue> CopySelectedParameter { 42 get { return (ValueParameter<BoolValue>)Parameters["CopySelected"]; } 43 43 } 44 public IValueLookupParameter<Int Data> NumberOfSelectedSubScopesParameter {45 get { return (ValueLookupParameter<Int Data>)Parameters["NumberOfSelectedSubScopes"]; }44 public IValueLookupParameter<IntValue> NumberOfSelectedSubScopesParameter { 45 get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfSelectedSubScopes"]; } 46 46 } 47 47 protected ScopeParameter CurrentScopeParameter { … … 49 49 } 50 50 51 public Bool DataCopySelected {51 public BoolValue CopySelected { 52 52 get { return CopySelectedParameter.Value; } 53 53 set { CopySelectedParameter.Value = value; } … … 59 59 protected Selector() 60 60 : base() { 61 Parameters.Add(new ValueParameter<Bool Data>("CopySelected", "True if the selected sub-scopes should be copied, otherwise false.", new BoolData(false)));62 Parameters.Add(new ValueLookupParameter<Int Data>("NumberOfSelectedSubScopes", "The number of sub-scopes which should be selected."));61 Parameters.Add(new ValueParameter<BoolValue>("CopySelected", "True if the selected sub-scopes should be copied, otherwise false.", new BoolValue(false))); 62 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSelectedSubScopes", "The number of sub-scopes which should be selected.")); 63 63 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope from which sub-scopes should be selected.")); 64 64 } -
trunk/sources/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs
r3017 r3048 33 33 [StorableClass] 34 34 public abstract class StochasticSingleObjectiveSelector : StochasticSelector, ISingleObjectiveSelector { 35 public IValueLookupParameter<Bool Data> MaximizationParameter {36 get { return (IValueLookupParameter<Bool Data>)Parameters["Maximization"]; }35 public IValueLookupParameter<BoolValue> MaximizationParameter { 36 get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 37 37 } 38 public ILookupParameter<ItemArray<Double Data>> QualityParameter {39 get { return (ILookupParameter<ItemArray<Double Data>>)Parameters["Quality"]; }38 public ILookupParameter<ItemArray<DoubleValue>> QualityParameter { 39 get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; } 40 40 } 41 41 42 42 protected StochasticSingleObjectiveSelector() 43 43 : base() { 44 Parameters.Add(new ValueLookupParameter<Bool Data>("Maximization", "True if the current problem is a maximization problem, otherwise false."));45 Parameters.Add(new SubScopesLookupParameter<Double Data>("Quality", "The quality value contained in each sub-scope which is used for selection."));44 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the current problem is a maximization problem, otherwise false.")); 45 Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The quality value contained in each sub-scope which is used for selection.")); 46 46 } 47 47 } -
trunk/sources/HeuristicLab.Selection/3.3/TournamentSelector.cs
r3017 r3048 35 35 [Creatable("Test")] 36 36 public sealed class TournamentSelector : StochasticSingleObjectiveSelector { 37 public ValueLookupParameter<Int Data> GroupSizeParameter {38 get { return (ValueLookupParameter<Int Data>)Parameters["GroupSize"]; }37 public ValueLookupParameter<IntValue> GroupSizeParameter { 38 get { return (ValueLookupParameter<IntValue>)Parameters["GroupSize"]; } 39 39 } 40 40 41 41 public TournamentSelector() : base() { 42 Parameters.Add(new ValueLookupParameter<Int Data>("GroupSize", "The size of the tournament group.", new IntData(2)));42 Parameters.Add(new ValueLookupParameter<IntValue>("GroupSize", "The size of the tournament group.", new IntValue(2))); 43 43 CopySelected.Value = true; 44 44 }
Note: See TracChangeset
for help on using the changeset viewer.