/// <summary> /// Построение матрицы "Минковский" /// </summary> /// <param name="method"></param> /// <param name="k_dim"></param> /// <param name="p"></param> public void BuildMatrix(string f, string method, int k_dim, double p) { File_Converter converter = new File_Converter(); DataTable excel_data = converter.Load_Excel_Table_From_File(f); Data_Converter d_conv = new Data_Converter(); MDS_Matrix matrix = new MDS_Matrix(excel_data, f); this.tabControl.Items.Add(new TabItem { Header = selection + k_dim.ToString() + p.ToString(), Content = matrix, IsSelected = true }); }
/// <summary> /// Построение матрицы "Евклидовый" /// </summary> /// <param name="method"></param> /// <param name="k_dim"></param> public void BuildMatrix(string f, string method, int k_dim) { File_Converter converter = new File_Converter(); DataTable excel_data = converter.Load_Excel_Table_From_File(f); Data_Converter d_conv = new Data_Converter(); MDS_Matrix matrix = new MDS_Matrix(excel_data, f); //Matrix_2D Matrix_2D = new Matrix_2D(); // Matrix_2D.Test_Builder(excel_data, matrix, d_conv.list_m_s, d_conv.list_w_s); this.tabControl.Items.Add(new TabItem { Header = selection + k_dim.ToString(), Content = matrix, IsSelected = true }); }
protected internal void Test_Builder( DataTable excel_table_data, string[] x_axis, string[] y_axis, string[] plot_title, List <ScatterSeries> list_matrix_series, List <ScatterSeries> list_work_series, MDS_Matrix form) { int plot_index = 0; // Индексация графиков int _columns = excel_table_data.Columns.Count; // Количество столбцов в таблице Excel int n = _columns * (_columns - 1); // Количество графиков var _height = (form.Matrix2D_Scroll.Height / _columns) - 10; var _width = (form.Matrix2D_Scroll.Width / _columns) - 10; // Инициализация рабочей области form.Matrix_WorkPanel.Children.Add(matrix2D_work_plot = new OxyPlot.Wpf.PlotView()); matrix2D_work_plot.Height = form.Matrix_WorkPanel.Height; matrix2D_work_plot.Width = form.Matrix_WorkPanel.Width; for (int i = 0; i < n; i++) { form.Matrix2D_MatrixPanel.Children.Add(matrix2D_matrix_plot = new OxyPlot.Wpf.PlotView()); matrix2D_matrix_plot.Height = _height; matrix2D_matrix_plot.Width = _width; matrix2D_matrix_plot.Padding = new Thickness(0.5, 0.5, 0.5, 0.5); matrix2D_matrix_plot.Margin = new Thickness(0.5, 0.5, 0.5, 0.5); Create_Model(plot_index, x_axis, y_axis, plot_title, list_matrix_series, list_work_series); plot_index = plot_index + 1; } }