Exemplo n.º 1
0
        private void btnSparseFile_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(comboFile.Text))
            {
                return;
            }

            var form = new SparseMatrixVisualizerForm();

            var A = MatrixHelper.LoadMatrix(radioDouble.Checked, comboFile.Text);

            form.SetStorageAdapter(A);
            form.ShowDialog();
        }
Exemplo n.º 2
0
        private void btnSparseRandom_Click(object sender, EventArgs e)
        {
            var form = new SparseMatrixVisualizerForm();

            int  rows, cols;
            bool symmetric;

            if (!Util.GetSparseRandomSize(comboSparseSize.Text, out rows, out cols, out symmetric))
            {
                return;
            }

            var A = MatrixHelper.CreateRandom(radioDouble.Checked, rows, cols, 0.05, symmetric);

            form.SetStorageAdapter(A);
            form.ShowDialog();
        }
Exemplo n.º 3
0
        private void btnSpecial_Click(object sender, EventArgs e)
        {
            var form = new SparseMatrixVisualizerForm();

            int nx, ny;

            bool laplacian;

            if (!Util.GetSpecialSize(comboWathen.Text, out nx, out ny, out laplacian))
            {
                return;
            }

            var A = MatrixHelper.CreateSpecial(radioDouble.Checked, laplacian, nx, ny);

            form.SetStorageAdapter(A);
            form.ShowDialog();
        }