Example #1
0
        public static double Prod(SuperArray arr)
        {
            double r, i;

            Internal.VERIFY(AFAlgorithm.af_product_all(out r, out i, arr.variable._ptr));
            return(r);
        }
        public static Complex Prod(AFArray arr)
        {
            double r, i;

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

            Internal.VERIFY(AFAlgorithm.af_product_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)));
            }
        }