Changeset 1463
- Timestamp:
- 03/30/09 12:51:34 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence.Test/NewSerializationTest.cs
r1456 r1463 188 188 189 189 public static void Test4() { 190 ArrayList[] arrayListArray = new ArrayList[ 3];190 ArrayList[] arrayListArray = new ArrayList[4]; 191 191 arrayListArray[0] = new ArrayList(); 192 192 arrayListArray[0].Add(arrayListArray); … … 197 197 arrayListArray[2].Add(arrayListArray); 198 198 arrayListArray[2].Add(arrayListArray); 199 Array a = Array.CreateInstance( 200 typeof(object), 201 new[] { 1, 2 }, new[] { 3, 4 }); 202 arrayListArray[2].Add(a); 199 203 XmlGenerator.Serialize(arrayListArray, "test4"); 200 204 object o = XmlParser.DeSerialize("test4"); -
trunk/sources/HeuristicLab.Persistence/Default/Decomposers/ArrayDecomposer.cs
r1454 r1463 43 43 e.MoveNext(); 44 44 lowerBounds[i] = (int)e.Current.Value; 45 } 46 Array a = Array.CreateInstance(t.GetElementType(), lengths, lowerBounds); 47 int[] positions = new int[rank];45 } 46 Array a = Array.CreateInstance(t.GetElementType(), lengths, lowerBounds); 47 int[] positions = (int[])lowerBounds.Clone(); 48 48 while (e.MoveNext()) { 49 49 int[] currentPositions = positions; … … 51 51 positions[0] += 1; 52 52 for (int i = 0; i < rank-1; i++) { 53 if (positions[i] >= lengths[i] ) {54 positions[i] = 0;53 if (positions[i] >= lengths[i]+lowerBounds[i]) { 54 positions[i] = lowerBounds[i]; 55 55 positions[i + 1] += 1; 56 56 } else {
Note: See TracChangeset
for help on using the changeset viewer.