- Timestamp:
- 11/23/15 21:07:22 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates/CompiledSingleObjectiveProblemDefinition_Template.cs
r13347 r13348 5 5 using HeuristicLab.Core; 6 6 using HeuristicLab.Data; 7 using {0}7 using ENCODING_NAMESPACE; 8 8 using HeuristicLab.Optimization; 9 9 using HeuristicLab.Problems.Programmable; 10 10 11 11 namespace HeuristicLab.Problems.Programmable { 12 public class CompiledSingleObjectiveProblemDefinition : Compiled ProblemDefinition<{1}, {2}>, ISingleObjectiveProblemDefinition<{1}, {2}> {13 public bool Maximization { get { return false; } }12 public class CompiledSingleObjectiveProblemDefinition : CompiledSingleObjectiveProblemDefinition<ENCODING_CLASS, SOLUTION_CLASS> { 13 public override bool Maximization { get { return false; } } 14 14 15 15 public override void Initialize() { … … 19 19 } 20 20 21 public double Evaluate({2} individual, IRandom random) {21 public override double Evaluate(SOLUTION_CLASS solution, IRandom random) { 22 22 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 23 23 var quality = 0.0; … … 25 25 } 26 26 27 public void Analyze({2}[] individuals, double[] qualities, ResultCollection results, IRandom random) {27 public override void Analyze(SOLUTION_CLASS[] solution, double[] qualities, ResultCollection results, IRandom random) { 28 28 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 29 29 // Write or update results given the range of vectors and resulting qualities … … 34 34 35 35 //if (!results.ContainsKey("Best Solution")) { 36 // results.Add(new Result("Best Solution", typeof( {20)));36 // results.Add(new Result("Best Solution", typeof(SOLUTION_CLASS))); 37 37 //} 38 38 //results["Best Solution"].Value = (IItem)best.Clone(); 39 39 } 40 40 41 public IEnumerable<{2}> GetNeighbors({2}individual, IRandom random) {41 public override IEnumerable<SOLUTION_CLASS> GetNeighbors(SOLUTION_CLASS individual, IRandom random) { 42 42 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 43 43 // Create new vectors, based on the given one that represent small changes … … 46 46 // Algorithm will draw only a finite amount of samples 47 47 // Change to a for-loop to return a concrete amount of neighbors 48 var neighbor = ( {2})individual.Clone();48 var neighbor = (SOLUTION_CLASS)individual.Clone(); 49 49 // modify the solution specified as neighbor 50 50 yield return neighbor; -
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates/ScriptTemplates.Designer.cs
r11949 r13348 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 184444 // Runtime Version:4.0.30319.34209 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 10 10 11 11 namespace HeuristicLab.Problems.Programmable { 12 using System; 13 14 12 using System; 13 14 15 /// <summary> 16 /// A strongly-typed resource class, for looking up localized strings, etc. 17 /// </summary> 18 // This class was auto-generated by the StronglyTypedResourceBuilder 19 // class via a tool like ResGen or Visual Studio. 20 // To add or remove a member, edit your .ResX file then rerun ResGen 21 // with the /str option, or rebuild your VS project. 22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 public class ScriptTemplates { 26 27 private static global::System.Resources.ResourceManager resourceMan; 28 29 private static global::System.Globalization.CultureInfo resourceCulture; 30 31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 internal ScriptTemplates() { 33 } 34 15 35 /// <summary> 16 /// A strongly-typed resource class, for looking up localized strings, etc.36 /// Returns the cached ResourceManager instance used by this class. 17 37 /// </summary> 18 // This class was auto-generated by the StronglyTypedResourceBuilder 19 // class via a tool like ResGen or Visual Studio. 20 // To add or remove a member, edit your .ResX file then rerun ResGen 21 // with the /str option, or rebuild your VS project. 22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 internal class ScriptTemplates { 26 27 private static global::System.Resources.ResourceManager resourceMan; 28 29 private static global::System.Globalization.CultureInfo resourceCulture; 30 31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 internal ScriptTemplates() { 38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 public static global::System.Resources.ResourceManager ResourceManager { 40 get { 41 if (object.ReferenceEquals(resourceMan, null)) { 42 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Problems.Programmable.Templates.ScriptTemplates", typeof(ScriptTemplates).Assembly); 43 resourceMan = temp; 33 44 } 34 35 /// <summary> 36 /// Returns the cached ResourceManager instance used by this class. 37 /// </summary> 38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 internal static global::System.Resources.ResourceManager ResourceManager { 40 get { 41 if (object.ReferenceEquals(resourceMan, null)) { 42 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Problems.Programmable.Templates.ScriptTemplates", typeof(ScriptTemplates).Assembly); 43 resourceMan = temp; 44 } 45 return resourceMan; 46 } 47 } 48 49 /// <summary> 50 /// Overrides the current thread's CurrentUICulture property for all 51 /// resource lookups using this strongly typed resource class. 52 /// </summary> 53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 internal static global::System.Globalization.CultureInfo Culture { 55 get { 56 return resourceCulture; 57 } 58 set { 59 resourceCulture = value; 60 } 61 } 62 63 /// <summary> 64 /// Looks up a localized string similar to using System; 65 ///using System.Linq; 66 ///using System.Collections.Generic; 67 ///using HeuristicLab.Common; 68 ///using HeuristicLab.Core; 69 ///using HeuristicLab.Data; 70 ///using HeuristicLab.Encodings.PermutationEncoding; 71 ///using HeuristicLab.Optimization; 72 ///using HeuristicLab.Problems.Programmable; 73 /// 74 ///namespace HeuristicLab.Problems.Programmable { 75 /// public class CompiledMultiObjectiveProblemDefinition : CompiledProblemDefinition, IMultiObjectiveProblemDefinition { 76 /// public bool[] Maximization { get { return new[] { false, fal [rest of string was truncated]";. 77 /// </summary> 78 internal static string CompiledMultiObjectiveProblemDefinition { 79 get { 80 return ResourceManager.GetString("CompiledMultiObjectiveProblemDefinition", resourceCulture); 81 } 82 } 83 84 /// <summary> 85 /// Looks up a localized string similar to using System; 86 ///using System.Linq; 87 ///using System.Collections.Generic; 88 ///using HeuristicLab.Common; 89 ///using HeuristicLab.Core; 90 ///using HeuristicLab.Data; 91 ///using HeuristicLab.Encodings.PermutationEncoding; 92 ///using HeuristicLab.Optimization; 93 ///using HeuristicLab.Problems.Programmable; 94 /// 95 ///namespace HeuristicLab.Problems.Programmable { 96 /// public class CompiledSingleObjectiveProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition { 97 /// public bool Maximization { get { return false; } } 98 /// 99 /// [rest of string was truncated]";. 100 /// </summary> 101 internal static string CompiledSingleObjectiveProblemDefinition { 102 get { 103 return ResourceManager.GetString("CompiledSingleObjectiveProblemDefinition", resourceCulture); 104 } 105 } 45 return resourceMan; 46 } 106 47 } 48 49 /// <summary> 50 /// Overrides the current thread's CurrentUICulture property for all 51 /// resource lookups using this strongly typed resource class. 52 /// </summary> 53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 public static global::System.Globalization.CultureInfo Culture { 55 get { 56 return resourceCulture; 57 } 58 set { 59 resourceCulture = value; 60 } 61 } 62 63 /// <summary> 64 /// Looks up a localized string similar to using System; 65 ///using System.Linq; 66 ///using System.Collections.Generic; 67 ///using HeuristicLab.Common; 68 ///using HeuristicLab.Core; 69 ///using HeuristicLab.Data; 70 ///using HeuristicLab.Encodings.BinaryVectorEncoding; 71 ///using HeuristicLab.Encodings.IntegerVectorEncoding; 72 ///using HeuristicLab.Encodings.RealVectorEncoding; 73 ///using HeuristicLab.Encodings.PermutationEncoding; 74 ///using HeuristicLab.Encodings.LinearLinkageEncoding; 75 ///using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 76 ///using HeuristicLab.Optimization; 77 ///using H [rest of string was truncated]";. 78 /// </summary> 79 public static string CompiledMultiObjectiveProblemDefinition_Template { 80 get { 81 return ResourceManager.GetString("CompiledMultiObjectiveProblemDefinition_Template", resourceCulture); 82 } 83 } 84 85 /// <summary> 86 /// Looks up a localized string similar to using System; 87 ///using System.Linq; 88 ///using System.Collections.Generic; 89 ///using HeuristicLab.Common; 90 ///using HeuristicLab.Core; 91 ///using HeuristicLab.Data; 92 ///using ENCODING_NAMESPACE; 93 ///using HeuristicLab.Optimization; 94 ///using HeuristicLab.Problems.Programmable; 95 /// 96 ///namespace HeuristicLab.Problems.Programmable { 97 /// public class CompiledSingleObjectiveProblemDefinition : CompiledSingleObjectiveProblemDefinition<ENCODING_CLASS, SOLUTION_CLASS> { 98 /// public override bool Maximization { get { return false; } } 99 /// 100 /// pub [rest of string was truncated]";. 101 /// </summary> 102 public static string CompiledSingleObjectiveProblemDefinition_Template { 103 get { 104 return ResourceManager.GetString("CompiledSingleObjectiveProblemDefinition_Template", resourceCulture); 105 } 106 } 107 } 107 108 } -
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates/ScriptTemplates.resx
r11753 r13348 119 119 </resheader> 120 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 121 <data name="CompiledMultiObjectiveProblemDefinition " type="System.Resources.ResXFileRef, System.Windows.Forms">122 <value>CompiledMultiObjectiveProblemDefinition .cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>121 <data name="CompiledMultiObjectiveProblemDefinition_Template" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 <value>CompiledMultiObjectiveProblemDefinition_Template.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> 123 123 </data> 124 <data name="CompiledSingleObjectiveProblemDefinition " type="System.Resources.ResXFileRef, System.Windows.Forms">125 <value>CompiledSingleObjectiveProblemDefinition .cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>124 <data name="CompiledSingleObjectiveProblemDefinition_Template" type="System.Resources.ResXFileRef, System.Windows.Forms"> 125 <value>CompiledSingleObjectiveProblemDefinition_Template.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> 126 126 </data> 127 127 </root>
Note: See TracChangeset
for help on using the changeset viewer.