MathNet.Numerics.LinearAlgebra.Single.DenseMatrix.DoDivide C# (CSharp) Method

DoDivide() protected method

Divides each element of the matrix by a scalar and places results into the result matrix.
protected DoDivide ( float divisor, Matrix result ) : void
divisor float The scalar to divide the matrix with.
result Matrix The matrix to store the result of the division.
return void
        protected override void DoDivide(float divisor, Matrix<float> result)
        {
            var denseResult = result as DenseMatrix;
            if (denseResult == null)
            {
                base.DoDivide(divisor, result);
            }
            else
            {
                Control.LinearAlgebraProvider.ScaleArray(1.0f/divisor, _values, denseResult._values);
            }
        }