Changeset 15273 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreterPool.cs
- Timestamp:
- 07/19/17 12:55:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/PushInterpreterPool.cs
r15189 r15273 5 5 using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool; 6 6 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions; 7 using HeuristicLab.Random;8 7 9 8 public class PushInterpreterPool { … … 33 32 public PooledPushInterpreter Create(IRandom random = null) { 34 33 var interpreter = pool.Allocate(); 35 interpreter.Random = random ?? new MersenneTwister(); 36 interpreter.Reset(); 34 interpreter.Reset(random); 37 35 38 36 return interpreter; … … 40 38 41 39 public void Free(PooledPushInterpreter interpreter) { 42 interpreter. Random = null;40 interpreter.ClearStacks(); 43 41 pool.Free(interpreter); 44 42 }
Note: See TracChangeset
for help on using the changeset viewer.