Accord.Math.Decompositions.NonnegativeFactorization.makepositive C# (CSharp) Метод

makepositive() приватный статический Метод

Enforces a matrix to contain only positive values.
private static makepositive ( double value ) : void
value double
Результат void
        private static unsafe void makepositive(double[,] value)
        {
            int length = value.Length;

            fixed (double* ptr = value)
            {
                double* p = ptr;
                for (int i = 0; i < length; i++, p++)
                {
                    if (*p < 0) *p = 0;
                }
            }
        }
    }