private ResultsContainer CentroidAnalysis2() { int pass = 0; var results = new ResultsContainer() { Name = "Centroid Analysis - All" , PageName = "CentroidAnalysis"}; Console.WriteLine("## Running group centroid analysis ## "); foreach (var setup in this.setups) { pass++; var patientResults = new List<LocalityResult>(); var analyser = new CentroidAnalysisMethod(setup); OutputAllocationStrategyName(pass); analyser.Execute(); if (pass == 1) { analyser.Result.ForEach(x => results.Home.Add(x)); } else { analyser.Result.ForEach(x => results.GP.Add(x)); } } return results; }
private void CentroidAnalysis() { int pass = 0; foreach (var setup in this.setups) { pass++; var patientResults = new List<LocalityResult>(); var analyser = new CentroidAnalysisMethod(setup); analyser.Execute(); if (pass == 1) { this.homeResults = new List<LocalityResult>(); analyser.Result.ForEach(x => homeResults.Add(x)); } else { this.gpResults = new List<LocalityResult>(); analyser.Result.ForEach(x => gpResults.Add(x)); var resultsPanel = new ResultsPanel(); resultsPanel.SetResults(homeResults, gpResults, setup.SelectedLocalities); AddResultsPanel("CentroidAnalysis", "Centroid Analysis - All", resultsPanel); } } }