public DBRowsDetail(SelfOrganizingMapsDBWindow.QueryResults queryResults, SelfOrganizingMapsDBWindow.ColumnSetStats columns, SOMResult somResult, int nodeIndex) { InitializeComponent(); _queryResults = queryResults; _columns = columns; _somResult = somResult; _nodeIndex = nodeIndex; }
private static SelfOrganizingMapsDBWindow.RowInput[] GetMatchingRows(SelfOrganizingMapsDBWindow.ColumnStats[] columns, SelfOrganizingMapsDBWindow.QueryResults queryResults, SOMResult som, int nodeIndex) { return SelfOrganizingMapsDBWindow.GetSOMInputs(columns, queryResults, false). Where(o => SelfOrganizingMaps.GetClosest(som.Nodes, o).Item2 == nodeIndex). ToArray(); }
private static SOMFieldStats[] GetColumnStats(SelfOrganizingMapsDBWindow.QueryResults results) { return Enumerable.Range(0, results.ColumnNames.Length). AsParallel(). Select(o => new { Index = o, Stats = SelfOrganizingMapsDB.GetFieldStats(results.Results.Select(p => p[o])) }). OrderBy(o => o.Index). Select(o => o.Stats). ToArray(); }