Changeset 10324
- Timestamp:
- 01/10/14 10:18:35 (11 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj
r9000 r10324 157 157 </ItemGroup> 158 158 <ItemGroup> 159 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 160 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> 161 <Name>HeuristicLab.Common-3.3</Name> 162 </ProjectReference> 159 163 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 160 164 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> -
trunk/sources/HeuristicLab.Collections/3.3/ObservableArray.cs
r9456 r10324 25 25 using System.ComponentModel; 26 26 using System.Linq; 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 … … 168 169 Array.Clear(array, index, length); 169 170 OnPropertyChanged("Item[]"); 170 OnItemsReplaced(GetIndexedItems(index, length), oldItems); 171 OnItemsReplaced(GetIndexedItems(index, length), oldItems); 171 172 } 172 173 } … … 205 206 if (array.Length > 1) { 206 207 IndexedItem<T>[] oldItems = GetIndexedItems(); 207 Array.Sort<T>(array);208 array.StableSort(); 208 209 OnPropertyChanged("Item[]"); 209 210 OnItemsMoved(GetIndexedItems(), oldItems); … … 213 214 if (array.Length > 1) { 214 215 IndexedItem<T>[] oldItems = GetIndexedItems(); 215 Array.Sort<T>(array,comparison);216 array.StableSort(comparison); 216 217 OnPropertyChanged("Item[]"); 217 218 OnItemsMoved(GetIndexedItems(), oldItems); … … 221 222 if (array.Length > 1) { 222 223 IndexedItem<T>[] oldItems = GetIndexedItems(); 223 Array.Sort<T>(array,comparer);224 array.StableSort(comparer); 224 225 OnPropertyChanged("Item[]"); 225 226 OnItemsMoved(GetIndexedItems(), oldItems); … … 229 230 if (length > 1) { 230 231 IndexedItem<T>[] oldItems = GetIndexedItems(index, length); 231 Array.Sort<T>(array,index, length);232 array.StableSort(index, length); 232 233 OnPropertyChanged("Item[]"); 233 234 OnItemsMoved(GetIndexedItems(index, length), oldItems); … … 237 238 if (length > 1) { 238 239 IndexedItem<T>[] oldItems = GetIndexedItems(index, length); 239 Array.Sort<T>(array,index, length, comparer);240 array.StableSort(index, length, comparer); 240 241 OnPropertyChanged("Item[]"); 241 242 OnItemsMoved(GetIndexedItems(index, length), oldItems); -
trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs
r9456 r10324 25 25 using System.ComponentModel; 26 26 using System.Linq; 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 … … 320 321 if (list.Count > 1) { 321 322 IndexedItem<T>[] oldItems = GetIndexedItems(); 322 list.S ort();323 list.StableSort(); 323 324 OnItemsMoved(GetIndexedItems(), oldItems); 324 325 OnPropertyChanged("Item[]"); … … 328 329 if (list.Count > 1) { 329 330 IndexedItem<T>[] oldItems = GetIndexedItems(); 330 list.S ort(comparison);331 list.StableSort(comparison); 331 332 OnItemsMoved(GetIndexedItems(), oldItems); 332 333 OnPropertyChanged("Item[]"); … … 336 337 if (list.Count > 1) { 337 338 IndexedItem<T>[] oldItems = GetIndexedItems(); 338 list.S ort(comparer);339 list.StableSort(comparer); 339 340 OnItemsMoved(GetIndexedItems(), oldItems); 340 341 OnPropertyChanged("Item[]"); … … 344 345 if (count > 1) { 345 346 IndexedItem<T>[] oldItems = GetIndexedItems(index, count); 346 list.S ort(index, count, comparer);347 list.StableSort(index, count, comparer); 347 348 OnItemsMoved(GetIndexedItems(index, count), oldItems); 348 349 OnPropertyChanged("Item[]"); -
trunk/sources/HeuristicLab.Collections/3.3/Plugin.cs.frame
r10037 r10324 29 29 [PluginFile("HeuristicLab.Collections-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Persistence", "3.3")] 31 [PluginDependency("HeuristicLab.Common", "3.3")] 31 32 public class HeuristicLabCollectionsPlugin : PluginBase { 32 33 } -
trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj
r9079 r10324 124 124 <Compile Include="Content\IStorableContent.cs" /> 125 125 <Compile Include="Constants.cs" /> 126 <Compile Include="ArrayExtensions.cs" /> 127 <Compile Include="ListExtensions.cs" /> 126 128 <Compile Include="Point2D.cs" /> 127 129 <Compile Include="EnumerableExtensions.cs" /> -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r9955 r10324 832 832 ts.SetSeedRandomly.Value = false; 833 833 RunAlgorithm(ts); 834 Assert.AreEqual(6 441, GetDoubleResult(ts, "BestQuality"));835 Assert.AreEqual(7 401.666666666667, GetDoubleResult(ts, "CurrentAverageQuality"));836 Assert.AreEqual(8 418, GetDoubleResult(ts, "CurrentWorstQuality"));834 Assert.AreEqual(6294, GetDoubleResult(ts, "BestQuality")); 835 Assert.AreEqual(7380.0386666666664, GetDoubleResult(ts, "CurrentAverageQuality")); 836 Assert.AreEqual(8328, GetDoubleResult(ts, "CurrentWorstQuality")); 837 837 Assert.AreEqual(750000, GetIntResult(ts, "EvaluatedMoves")); 838 838 } … … 903 903 vrp.SetSeedRandomly.Value = false; 904 904 RunAlgorithm(vrp); 905 Assert.AreEqual(14 36, GetDoubleResult(vrp, "BestQuality"));906 Assert.AreEqual(21 32.2478893442621, GetDoubleResult(vrp, "CurrentAverageQuality"));907 Assert.AreEqual(4 176.0, GetDoubleResult(vrp, "CurrentWorstQuality"));908 Assert.AreEqual(1190 11, GetIntResult(vrp, "EvaluatedMoves"));905 Assert.AreEqual(1473, GetDoubleResult(vrp, "BestQuality")); 906 Assert.AreEqual(2102.1192622950812, GetDoubleResult(vrp, "CurrentAverageQuality")); 907 Assert.AreEqual(4006, GetDoubleResult(vrp, "CurrentWorstQuality")); 908 Assert.AreEqual(119072, GetIntResult(vrp, "EvaluatedMoves")); 909 909 } 910 910 -
trunk/sources/HeuristicLab.Tests/TestRandom.cs
r9456 r10324 61 61 62 62 public TestRandom(int[] intNumbers, double[] doubleNumbers) { 63 if (intNumbers == null) intNumbers = new int[0];63 if (intNumbers == null) this.intNumbers = new int[0]; 64 64 else this.intNumbers = intNumbers; 65 if (doubleNumbers == null) doubleNumbers = new double[0];65 if (doubleNumbers == null) this.doubleNumbers = new double[0]; 66 66 else this.doubleNumbers = doubleNumbers; 67 67 nextIntIndex = 0;
Note: See TracChangeset
for help on using the changeset viewer.