Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs
r6003 r6760 22 22 using System.Linq; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Core.Views;25 24 using HeuristicLab.Data; 26 25 using HeuristicLab.Data.Views; … … 31 30 [View("Estimated Clusters")] 32 31 [Content(typeof(IClusteringSolution))] 33 public partial class ClusteringSolutionEstimatedClusterView : ItemView, IClusteringSolutionEvaluationView {32 public partial class ClusteringSolutionEstimatedClusterView : DataAnalysisSolutionEvaluationView { 34 33 private const string CLUSTER_NAMES = "Cluster"; 35 34 … … 86 85 int[] clusters = Content.Model.GetClusterValues(Content.ProblemData.Dataset, Enumerable.Range(0, Content.ProblemData.Dataset.Rows)).ToArray(); 87 86 var dataset = Content.ProblemData.Dataset; 88 int columns = Content.ProblemData.AllowedInputVariables.Count() + 1; 89 var columnsIndixes = Content.ProblemData.AllowedInputVariables.Select(x => dataset.GetVariableIndex(x)).ToList(); 87 int columns = Content.ProblemData.AllowedInputVariables.Count() + 1; 90 88 91 89 double[,] values = new double[dataset.Rows, columns]; … … 94 92 95 93 int column = 1; 96 foreach ( int columnIndex in columnsIndixes) {97 values[row, column] = dataset [row, columnIndex];94 foreach (var columnName in Content.ProblemData.AllowedInputVariables) { 95 values[row, column] = dataset.GetDoubleValue(columnName, row); 98 96 column++; 99 97 }
Note: See TracChangeset
for help on using the changeset viewer.