Accord.Math.Decompositions.NonnegativeFactorization.maxabs C# (CSharp) Method

maxabs() private static method

Max absolute value
private static maxabs ( double value ) : double
value double
return double
        private static unsafe double maxabs(double[,] value)
        {
            int length = value.Length;

            fixed (double* matrix = value)
            {
                double* p = matrix;

                double max = System.Math.Abs(*p), d;
                for (int i = 1; i < length; i++, p++)
                {
                    d = System.Math.Abs(*p);
                    if (d > max) max = d;
                }

                return max;
            }
        }