예제 #1
0
        public static double Max(SuperArray arr)
        {
            double r, i;

            Internal.VERIFY(AFAlgorithm.af_max_all(out r, out i, arr.variable._ptr));
            return(r);
        }
예제 #2
0
        public static Complex Max(AFArray arr)
        {
            double r, i;

            Internal.VERIFY(AFAlgorithm.af_max_all(out r, out i, arr._ptr));
            return(new Complex(r, i));
        }
예제 #3
0
        public static returnType MaxAll <returnType>(Array arr)
        {
            double r, i;

            Internal.VERIFY(AFAlgorithm.af_max_all(out r, out i, arr._ptr));
            if (typeof(returnType) == typeof(Complex))
            {
                return((returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType)));
            }
            else
            {
                return((returnType)Convert.ChangeType(r, typeof(returnType)));
            }
        }