Пример #1
0
        private void DrawInitial()
        {
            dgvContainer.Controls.Clear();
            var arr = MathExtend.ListTo2DArr(inputData);

            var table = this.DrawTable(arr);

            dataTable.Columns.Clear();

            for (int i = 0; i < arr.GetUpperBound(1) + 1; i++)
            {
                dataTable.Columns.Add("column_" + i.ToString(), (i + 1).ToString());
            }

            addRowsFromSource(table, ref dataTable);
            dataTable.Visible = true;

            for (int i = 0; i < arr.GetUpperBound(0) + 1; i++)
            {
                dataTable.Rows[i].HeaderCell.Value = i + 1;
            }
        }
Пример #2
0
 public static double Nok(double a, double b)
 {
     return(Math.Abs(a * b) / MathExtend.Nod(a, b));
 }