Changeset 11753 for branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs
- Timestamp:
- 01/13/15 18:47:19 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs
r11739 r11753 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Linq; 25 24 using System.Reflection; … … 47 46 variableStore = cloner.Clone(original.variableStore); 48 47 } 49 protected ProblemDefinitionScript() :base(){ 48 protected ProblemDefinitionScript() 49 : base() { 50 50 variableStore = new VariableStore(); 51 51 } 52 52 53 53 IEncoding IProblemDefinition.Encoding { 54 get { return CompiledProblemDefinition != null ? CompiledProblemDefinition.Encoding : null; } 55 } 56 IEnumerable<Individual> IProblemDefinition.GetNeighbors(Individual individual, IRandom random) { 57 return CompiledProblemDefinition.GetNeighbors(individual, random); 54 get { return CompiledProblemDefinition.Encoding; } 58 55 } 59 56 … … 62 59 protected IProblemDefinition CompiledProblemDefinition { 63 60 get { 64 lock (locker) { 65 if (compiledProblemDefinition == null) { 66 Compile(); 67 } 68 } 61 //lock (locker) { 62 // if (compiledProblemDefinition == null) { 63 // Compile(); 64 // } 65 //} 66 if (compiledProblemDefinition == null) throw new InvalidOperationException("The problem definition script is not compiled and cannot be used."); 69 67 return compiledProblemDefinition; 70 68 }
Note: See TracChangeset
for help on using the changeset viewer.