Beispiel #1
0
        private void detButton_Click(object sender, EventArgs e)
        {
            TakeBoxes(_left.Matrix, _leftBoxes);
            IFindDeterminant algorithm = detBox1.SelectedIndex switch
            {
                0 => new NativeFindDeterminant(),
                1 => new LibraryFindDeterminant(),
                _ => null
            };

            detLabel.Text = _left.Determinant(algorithm).ToString();
            if (_left is TimeDecorator timeDecorator)
            {
                timeLabel.Text = timeDecorator.Time + " ms";
            }
        }
 /// <summary>
 /// Calls Determinant method of MatrixFacade instance.
 /// </summary>
 /// <param name="det">Passed algorithm for determinant find.</param>
 /// <returns>Matrix determinant.</returns>
 public virtual long Determinant(IFindDeterminant det)
 {
     return(_facade.Determinant(det));
 }