Changeset 9217 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/DataAnalysisInstanceProvider.cs
- Timestamp:
- 02/17/13 17:18:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/DataAnalysisInstanceProvider.cs
r8878 r9217 49 49 int count = values.First().Count; 50 50 int[] indices = Enumerable.Range(0, count).Shuffle(new FastRandom()).ToArray(); 51 List<IList> shuff eledValues= new List<IList>(values.Count);51 List<IList> shuffled = new List<IList>(values.Count); 52 52 for (int col = 0; col < values.Count; col++) { 53 53 54 54 if (values[col] is List<double>) 55 shuff eledValues.Add(new List<double>());55 shuffled.Add(new List<double>()); 56 56 else if (values[col] is List<DateTime>) 57 shuff eledValues.Add(new List<DateTime>());57 shuffled.Add(new List<DateTime>()); 58 58 else if (values[col] is List<string>) 59 shuff eledValues.Add(new List<string>());59 shuffled.Add(new List<string>()); 60 60 else 61 61 throw new InvalidOperationException(); 62 62 63 63 for (int i = 0; i < count; i++) { 64 shuff eledValues[col].Add(values[col][indices[i]]);64 shuffled[col].Add(values[col][indices[i]]); 65 65 } 66 66 } 67 return shuff eledValues;67 return shuffled; 68 68 } 69 69
Note: See TracChangeset
for help on using the changeset viewer.