Changeset 14897 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions
- Timestamp:
- 04/28/17 22:52:08 (8 years ago)
- Location:
- branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/EqualsExpressions.cs
r14875 r14897 1 1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions { 2 2 using System.Collections.Generic; 3 4 using HeuristicLab.Common; 5 using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes; 6 using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter; 7 using HeuristicLab.Problems.ProgramSynthesis.Push.Stack; 3 using Attributes; 4 using Common; 5 using Interpreter; 6 using Stack; 8 7 9 8 /// <summary> -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/RandExpressions.cs
r14834 r14897 1 1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions { 2 2 using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes; 3 using HeuristicLab.Problems.ProgramSynthesis.Push.Generators;4 3 using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator; 5 4 using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter; 6 5 using HeuristicLab.Problems.ProgramSynthesis.Push.Stack; 7 using HeuristicLab.Random;8 6 9 7 /// <summary> … … 16 14 return false; 17 15 18 var name = interpreter.CustomExpressions.Count == 0 || interpreter.Random.NextDouble() < interpreter.Configuration.ErcOptions.NameErcOptions.NewNameProbability 19 ? ErcUtils.GetName(interpreter.Configuration.ErcOptions.NameErcOptions, interpreter.Random) 20 : interpreter.CustomExpressions.Keys.SampleRandom(interpreter.Random); 21 16 var name = interpreter.Configuration.ErcOptions.NameErcOptions.GetErcValue(interpreter.Random); 22 17 interpreter.NameStack.Push(name); 23 18 return true; … … 34 29 return false; 35 30 36 var value = ErcUtils.GetInteger(interpreter.Configuration.ErcOptions.IntegerErcOptions,interpreter.Random);31 var value = interpreter.Configuration.ErcOptions.IntegerErcOptions.GetErcValue(interpreter.Random); 37 32 interpreter.IntegerStack.Push(value); 38 33 return true; … … 49 44 return false; 50 45 51 var value = ErcUtils.GetDouble(interpreter.Configuration.ErcOptions.FloatErcOptions,interpreter.Random);46 var value = interpreter.Configuration.ErcOptions.FloatErcOptions.GetErcValue(interpreter.Random); 52 47 interpreter.FloatStack.Push(value); 53 48 return true; … … 64 59 return false; 65 60 66 var value = ErcUtils.GetBoolean(interpreter.Configuration.ErcOptions.BooleanErcOptions,interpreter.Random);61 var value = interpreter.Configuration.ErcOptions.BooleanErcOptions.GetErcValue(interpreter.Random); 67 62 interpreter.BooleanStack.Push(value); 68 63 return true;
Note: See TracChangeset
for help on using the changeset viewer.