Changeset 15771 for branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration
- Timestamp:
- 02/13/18 16:56:35 (7 years ago)
- Location:
- branches/2895_PushGP_GenealogyAnalysis
- Files:
-
- 1 added
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IEnabledExpressionsConfiguration.cs
r15289 r15771 2 2 using System.Collections.Generic; 3 3 4 namespace HeuristicLab.Problems.ProgramSynthesis .Push.Configuration{4 namespace HeuristicLab.Problems.ProgramSynthesis { 5 5 using HeuristicLab.Core; 6 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;7 using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;8 6 9 7 public class EnabledExpressionsChangedEventArgs : EventArgs { -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IReadonlyPushConfiguration.cs
r15341 r15771 1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration { 2 3 using Base.Erc; 4 5 using Stack; 6 1 namespace HeuristicLab.Problems.ProgramSynthesis { 7 2 public interface IReadOnlyPushConfiguration : IReadOnlyExpressionsConfiguration { 8 3 int EvalPushLimit { get; } -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfiguration.cs
r15344 r15771 1 namespace HeuristicLab.Problems.ProgramSynthesis .Push.Configuration{1 namespace HeuristicLab.Problems.ProgramSynthesis { 2 2 using System.Collections.Generic; 3 3 … … 7 7 using HeuristicLab.Parameters; 8 8 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 9 using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;10 9 11 10 [StorableClass] … … 145 144 } 146 145 147 public IValueParameter<IExpressionsConfiguration> InstructionsParameter 148 { 146 public IValueParameter<IExpressionsConfiguration> InstructionsParameter { 149 147 get { return (IValueParameter<IExpressionsConfiguration>)Parameters[INSTRUCTIONS_PARAMETER_NAME]; } 150 148 } 151 149 152 public IExpressionsConfiguration Instructions 153 { 150 public IExpressionsConfiguration Instructions { 154 151 get { return InstructionsParameter.Value; } 155 152 set { InstructionsParameter.Value = value; } 156 153 } 157 154 158 public IValueParameter<ErcOptions> ErcOptionsParameter 159 { 155 public IValueParameter<ErcOptions> ErcOptionsParameter { 160 156 get { return (IValueParameter<ErcOptions>)Parameters[ERC_OPTIONS_PARAMETER_NAME]; } 161 157 } 162 158 163 public ErcOptions ErcOptions 164 { 159 public ErcOptions ErcOptions { 165 160 get { return ErcOptionsParameter.Value; } 166 set 167 { 161 set { 168 162 ErcOptionsParameter.Value = value; 169 163 } 170 164 } 171 165 172 IReadOnlyList<string> IReadOnlyExpressionsConfiguration.EnabledExpressions 173 { 174 get 175 { 166 IReadOnlyList<string> IReadOnlyExpressionsConfiguration.EnabledExpressions { 167 get { 176 168 return enabledExpressions; 177 169 } 178 170 } 179 171 180 IReadOnlyErcOptions IReadOnlyPushConfiguration.ErcOptions 181 { 182 get 183 { 172 IReadOnlyErcOptions IReadOnlyPushConfiguration.ErcOptions { 173 get { 184 174 return ErcOptions; 185 175 } … … 195 185 /// is up to the calling program. 196 186 /// </summary> 197 public IValueParameter<IntValue> EvalPushLimitParameter 198 { 187 public IValueParameter<IntValue> EvalPushLimitParameter { 199 188 get { return (IValueParameter<IntValue>)Parameters[EVAL_PUSH_LIMIT_PARAMETER_NAME]; } 200 189 } 201 190 202 public int EvalPushLimit 203 { 191 public int EvalPushLimit { 204 192 get { return EvalPushLimitParameter.Value.Value; } 205 193 set { EvalPushLimitParameter.Value.Value = value; } … … 212 200 /// x smaller than 1 means that result is biased towards max. 213 201 /// </summary> 214 public IValueParameter<DoubleValue> CloseBiasLevelParameter 215 { 202 public IValueParameter<DoubleValue> CloseBiasLevelParameter { 216 203 get { return (IValueParameter<DoubleValue>)Parameters[CLOSE_BIAS_LEVEL_PARAMETER_NAME]; } 217 204 } 218 205 219 public double CloseBiasLevel 220 { 206 public double CloseBiasLevel { 221 207 get { return CloseBiasLevelParameter.Value.Value; } 222 208 set { CloseBiasLevelParameter.Value.Value = value; } … … 226 212 /// Determines the maximum of blocks which will be closed. 227 213 /// </summary> 228 public IValueParameter<IntValue> MaxCloseParameter 229 { 214 public IValueParameter<IntValue> MaxCloseParameter { 230 215 get { return (IValueParameter<IntValue>)Parameters[MAX_CLOSE_PARAMETER_NAME]; } 231 216 } 232 217 233 public int MaxClose 234 { 218 public int MaxClose { 235 219 get { return MaxCloseParameter.Value.Value; } 236 set 237 { 220 set { 238 221 MaxCloseParameter.Value.Value = value; 239 222 } … … 243 226 /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP. 244 227 /// </summary> 245 public IValueParameter<IntValue> MaxDepthParameter 246 { 228 public IValueParameter<IntValue> MaxDepthParameter { 247 229 get { return (IValueParameter<IntValue>)Parameters[MAX_DEPTH_PARAMETER_NAME]; } 248 230 } 249 231 250 public int MaxDepth 251 { 232 public int MaxDepth { 252 233 get { return MaxDepthParameter.Value.Value; } 253 set 254 { 234 set { 255 235 MaxDepthParameter.Value.Value = value; 256 236 } 257 237 } 258 238 259 public IValueParameter<IntValue> MinProgramLengthParameter 260 { 239 public IValueParameter<IntValue> MinProgramLengthParameter { 261 240 get { return (IValueParameter<IntValue>)Parameters[MIN_PROGRAM_LENGTH]; } 262 241 } 263 242 264 public int MinProgramLength 265 { 243 public int MinProgramLength { 266 244 get { return MinProgramLengthParameter.Value.Value; } 267 set 268 { 245 set { 269 246 MinProgramLengthParameter.Value.Value = value; 270 247 } … … 277 254 /// instruction. 278 255 /// </summary> 279 public IValueParameter<IntValue> MaxProgramLengthParameter 280 { 256 public IValueParameter<IntValue> MaxProgramLengthParameter { 281 257 get { return (IValueParameter<IntValue>)Parameters[MAX_PROGRAM_LENGTH]; } 282 258 } 283 259 284 public int MaxProgramLength 285 { 260 public int MaxProgramLength { 286 261 get { return MaxProgramLengthParameter.Value.Value; } 287 set 288 { 262 set { 289 263 MaxProgramLengthParameter.Value.Value = value; 290 264 } 291 265 } 292 266 293 public IValueParameter<IntValue> MaxVectorLengthParameter 294 { 267 public IValueParameter<IntValue> MaxVectorLengthParameter { 295 268 get { return (IValueParameter<IntValue>)Parameters[MAX_VECTOR_LENGTH_PARAMETER_NAME]; } 296 269 } 297 270 298 public int MaxVectorLength 299 { 271 public int MaxVectorLength { 300 272 get { return MaxVectorLengthParameter.Value.Value; } 301 273 set { MaxVectorLengthParameter.Value.Value = value; } … … 305 277 /// The maximum number of points in an expression produced by the CODE.RAND instruction. 306 278 /// </summary> 307 public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter 308 { 279 public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter { 309 280 get { return (IValueParameter<IntValue>)Parameters[MAX_POINTS_IN_RANDOM_INSTRUCTION_PARAMETER_NAME]; } 310 281 } 311 282 312 public int MaxPointsInRandomExpression 313 { 283 public int MaxPointsInRandomExpression { 314 284 get { return MaxPointsInRandomExpressionParameter.Value.Value; } 315 set 316 { 285 set { 317 286 MaxPointsInRandomExpressionParameter.Value.Value = value; 318 287 } … … 323 292 /// will be pushed onto the CODE stack prior to execution. 324 293 /// </summary> 325 public IValueParameter<BoolValue> TopLevelPushCodeParameter 326 { 294 public IValueParameter<BoolValue> TopLevelPushCodeParameter { 327 295 get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_PUSH_CODE_PARAMETER_NAME]; } 328 296 } 329 297 330 public bool TopLevelPushCode 331 { 298 public bool TopLevelPushCode { 332 299 get { return TopLevelPushCodeParameter.Value.Value; } 333 set 334 { 300 set { 335 301 TopLevelPushCodeParameter.Value.Value = value; 336 302 } … … 340 306 /// When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE. 341 307 /// </summary> 342 public IValueParameter<BoolValue> TopLevelPopCodeParameter 343 { 308 public IValueParameter<BoolValue> TopLevelPopCodeParameter { 344 309 get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_POP_CODE_PARAMETER_NAME]; } 345 310 } 346 311 347 public bool TopLevelPopCode 348 { 312 public bool TopLevelPopCode { 349 313 get { return TopLevelPopCodeParameter.Value.Value; } 350 set 351 { 314 set { 352 315 TopLevelPopCodeParameter.Value.Value = value; 353 316 } 354 317 } 355 318 356 public IValueParameter<IntValue> MaxStringLengthParameter 357 { 319 public IValueParameter<IntValue> MaxStringLengthParameter { 358 320 get { return (IValueParameter<IntValue>)Parameters[MAX_STRING_LENGTH_PARAMETER_NAME]; } 359 321 } 360 322 361 public int MaxStringLength 362 { 323 public int MaxStringLength { 363 324 get { return MaxStringLengthParameter.Value.Value; } 364 325 set { MaxStringLengthParameter.Value.Value = value; } 365 326 } 366 327 367 public IValueParameter<BoolValue> TopLevelPushInputArgumentsParameter 368 { 328 public IValueParameter<BoolValue> TopLevelPushInputArgumentsParameter { 369 329 get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_PUSH_INPUT_ARGUMENTS]; } 370 330 } 371 331 372 public bool TopLevelPushInputArguments 373 { 332 public bool TopLevelPushInputArguments { 374 333 get { return TopLevelPushInputArgumentsParameter.Value.Value; } 375 334 set { TopLevelPushInputArgumentsParameter.Value.Value = value; } -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs
r15273 r15771 3 3 using System.Linq; 4 4 5 namespace HeuristicLab.Problems.ProgramSynthesis .Push.Configuration{5 namespace HeuristicLab.Problems.ProgramSynthesis { 6 6 using HeuristicLab.Common; 7 7 using HeuristicLab.Core; 8 8 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 9 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;10 using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;11 using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;12 9 13 10 [StorableClass] … … 53 50 } 54 51 55 public IReadOnlyList<string> EnabledExpressions 56 { 52 public IReadOnlyList<string> EnabledExpressions { 57 53 get { return enabledExpressions; } 58 set 59 { 54 set { 60 55 var removedExpressions = enabledExpressions.ToList(); 61 56 enabledExpressions.Clear();
Note: See TracChangeset
for help on using the changeset viewer.