Exemple #1
0
        private void but_sparse_Click(object sender, EventArgs e)
        {
            Console.Clear();
            b = picBox.CreateGraphics();
            b.Clear(BackColor);

            cons = new DrawInConsole(checkBox1.Checked);
            form = new DrawInForm(b, checkBox1.Checked);

            current_matrix = new SparseMatrix(7, 7);
            InitiatorMatrix.RandomMatr(current_matrix, 10, 100);

            current_matrix.Draw(cons);
            current_matrix.Draw(form);
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            hor_gr = new HorizontalGroupOfMatrix();
            SparseMatrix a = new SparseMatrix(2, 2);

            InitiatorMatrix.RandomMatr(a, 4, 100);
            hor_gr.AddComponent(a);
            SparseMatrix m = new SparseMatrix(5, 4);

            InitiatorMatrix.RandomMatr(m, 5, 7);
            hor_gr.AddComponent(m);

            Console.Clear();
            b = picBox.CreateGraphics();
            b.Clear(BackColor);

            cons = new DrawInConsole(checkBox1.Checked);
            form = new DrawInForm(b, checkBox1.Checked);

            current_matrix = hor_gr;
            current_matrix.Draw(cons);
            current_matrix.Draw(form);
        }