SampleApp.MainForm.btnEstimateLaplacian_Click C# (CSharp) Method

btnEstimateLaplacian_Click() private method

private btnEstimateLaplacian_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void btnEstimateLaplacian_Click(object sender, EventArgs e)
        {
            DataTable source = dgvLearningSource.DataSource as DataTable;

            // Creates a matrix from the source data table
            double[,] sourceMatrix = source.ToMatrix(out columnNames);

            // Get only the input vector values (in the first two columns)
            double[][] inputs = sourceMatrix.GetColumns(0, 1).ToArray();

            DoubleRange range; // valid range will be returned as an out parameter
            var laplacian = Laplacian.Estimate(inputs, inputs.Length, out range);

            numLaplacianSigma.Value = (decimal)laplacian.Sigma;
        }
MainForm