Changeset 4010
- Timestamp:
- 07/07/10 11:26:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/RunCollectionVariableImpactView.cs
r3975 r4010 83 83 DoubleMatrix matrix = null; 84 84 if (Content != null) { 85 IEnumerable<IRun> runsWithVariables = Content.Where(r => r.Results.ContainsKey(variableImpactResultName));85 List<IRun> runsWithVariables = Content.Where(r => r.Results.ContainsKey(variableImpactResultName)).ToList() ; 86 86 IEnumerable<DoubleMatrix> variableImpacts = (from run in runsWithVariables 87 87 select run.Results[variableImpactResultName]).Cast<DoubleMatrix>(); … … 99 99 matrix.ColumnNames = columnNames; 100 100 101 foreach (IRun run in runsWithVariables) { 101 for(int i = 0; i< runsWithVariables.Count; i++) { 102 IRun run = runsWithVariables[i]; 102 103 DoubleMatrix runVariableImpacts = (DoubleMatrix)run.Results[variableImpactResultName]; 103 for (int i = 0; i < runVariableImpacts.Rows; i++) { 104 int rowIndex = variableNames.FindIndex(s => s == runVariableImpacts.RowNames.ElementAt(i)); 105 int columnIndex = columnNames.FindIndex(s => s == run.Name); 106 matrix[rowIndex, columnIndex] = runVariableImpacts[i, 0]; 104 for (int j = 0; j < runVariableImpacts.Rows; j++) { 105 int rowIndex = variableNames.FindIndex(s => s == runVariableImpacts.RowNames.ElementAt(j)); 106 matrix[rowIndex, i] = runVariableImpacts[j, 0]; 107 107 } 108 108 }
Note: See TracChangeset
for help on using the changeset viewer.