Changeset 5184 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations
- Timestamp:
- 12/30/10 22:50:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ValueConfiguration.cs
r5144 r5184 95 95 RangeConstraint = new DoubleValueRange(new DoubleValue(0), (DoubleValue)value, new DoubleValue(0.01)); 96 96 } else if (actualValue.ValueDataType == typeof(PercentValue)) { 97 RangeConstraint = new PercentValueRange(new PercentValue(0), new PercentValue(1), new PercentValue(0.0 01));97 RangeConstraint = new PercentValueRange(new PercentValue(0), new PercentValue(1), new PercentValue(0.01)); 98 98 } else if (actualValue.ValueDataType == typeof(BoolValue)) { 99 99 this.IsOptimizable = false; // there is nothing to configure for bools … … 211 211 } 212 212 213 public string ToParameterInfoString() { 214 StringBuilder sb = new StringBuilder(); 215 if (this.Optimize) { 216 if (this.ParameterConfigurations.Count > 0) { 217 var parameterInfos = new List<string>(); 218 foreach (var pc in this.ParameterConfigurations) { 219 if (pc.Optimize) parameterInfos.Add(pc.ToParameterInfoString()); 220 } 221 sb.Append(string.Join(", ", parameterInfos.ToArray())); 222 } 223 } 224 return sb.ToString(); 213 public string ParameterInfoString { 214 get { 215 StringBuilder sb = new StringBuilder(); 216 if (this.Optimize) { 217 if (this.ParameterConfigurations.Count > 0) { 218 var parameterInfos = new List<string>(); 219 foreach (var pc in this.ParameterConfigurations) { 220 if (pc.Optimize) parameterInfos.Add(pc.ParameterInfoString); 221 } 222 sb.Append(string.Join(", ", parameterInfos.ToArray())); 223 } 224 } 225 return sb.ToString(); 226 } 225 227 } 226 228
Note: See TracChangeset
for help on using the changeset viewer.