Changeset 14133 for stable/HeuristicLab.Optimization
- Timestamp:
- 07/20/16 18:02:08 (8 years ago)
- Location:
- stable
- Files:
-
- 3 deleted
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14037,14056-14057,14071,14100
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Optimization merged: 14071,14100
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r13282 r14133 155 155 <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" /> 156 156 <Compile Include="Interfaces\IMultiObjectiveOperator.cs" /> 157 <Compile Include="Results\IResultParameter.cs" /> 157 158 <Compile Include="Interfaces\ISingleObjectiveOperator.cs" /> 158 159 <Compile Include="Interfaces\ISingleObjectivePathRelinker.cs" /> … … 168 169 <Compile Include="MetaOptimizers\Experiment.cs" /> 169 170 <Compile Include="MetaOptimizers\TimeLimitRun.cs" /> 171 <Compile Include="Results\ResultParameter.cs" /> 170 172 <Compile Include="RunCollectionModification\RunCollectionRunRemover.cs" /> 171 173 <Compile Include="Plugin.cs" /> … … 229 231 <Compile Include="RunCollection.cs" /> 230 232 <Compile Include="Run.cs" /> 231 <Compile Include=" Interfaces\IResult.cs" />233 <Compile Include="Results\IResult.cs" /> 232 234 <Compile Include="Interfaces\IDiscreteDoubleValueModifier.cs" /> 233 235 <Compile Include="Interfaces\IExhaustiveMoveGenerator.cs" /> … … 253 255 <Compile Include="Interfaces\ITabuChecker.cs" /> 254 256 <Compile Include="Interfaces\ITabuMaker.cs" /> 255 <Compile Include="Result .cs" />257 <Compile Include="Results\Result.cs" /> 256 258 <Compile Include="Algorithms\UserDefinedAlgorithm.cs" /> 257 259 <Compile Include="Algorithms\EngineAlgorithm.cs" /> 258 260 <Compile Include="Properties\AssemblyInfo.cs" /> 259 <Compile Include="Result Collection.cs" />261 <Compile Include="Results\ResultCollection.cs" /> 260 262 <Compile Include="Problems\UserDefinedProblem.cs" /> 261 263 </ItemGroup> -
stable/HeuristicLab.Optimization/3.3/Results/ResultParameter.cs
r14071 r14133 33 33 public sealed class ResultParameter<T> : LookupParameter<T>, IResultParameter<T> where T : class, IItem { 34 34 public override Image ItemImage { get { return VSImageLibrary.Exception; } } 35 public override bool CanChangeDescription { get { return true; } } 35 36 36 37 [Storable] … … 71 72 } 72 73 public ResultParameter() : this("Anonymous", string.Empty, "Results") { } 73 public ResultParameter(string name) : this(name, string.Empty, "Results") { }74 74 public ResultParameter(string name, string description) : this(name, description, "Results") { } 75 75 76 public ResultParameter(string name, string description, string resultCollectionName) 76 77 : base(name, description, string.Empty) { 77 78 if (string.IsNullOrEmpty(resultCollectionName)) throw new ArgumentException("resultCollectionName"); 78 79 this.resultCollectionName = resultCollectionName; 80 Hidden = false; 79 81 } 80 82 public ResultParameter(string name, string description, string resultCollectionName, T defaultValue) … … 84 86 this.resultCollectionName = resultCollectionName; 85 87 this.defaultValue = defaultValue; 88 Hidden = false; 86 89 } 87 90 … … 102 105 if (!results.TryGetValue(ActualName, out result)) { 103 106 if (DefaultValue == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): Result not found and no default value specified."); 104 result = new Result(ActualName, (T)DefaultValue.Clone());107 result = ItemDescription == Description ? new Result(ActualName, (T)DefaultValue.Clone()) : new Result(ActualName, Description, (T)DefaultValue.Clone()); 105 108 results.Add(result); 106 109 } … … 127 130 IResult result; 128 131 if (!results.TryGetValue(ActualName, out result)) { 129 result = new Result(ActualName, value);132 result = ItemDescription == Description ? new Result(ActualName, value) : new Result(ActualName, Description, value); 130 133 results.Add(result); 131 134 } else result.Value = value;
Note: See TracChangeset
for help on using the changeset viewer.