예제 #1
0
        public static AFArray Prod(AFArray arr, int dim)
        {
            IntPtr ptr;

            Internal.VERIFY(AFAlgorithm.af_product(out ptr, arr._ptr, dim));
            return(new AFArray(ptr));
        }
예제 #2
0
        public static Array Product(Array arr, int dim = -1)
        {
            IntPtr ptr;

            Internal.VERIFY(AFAlgorithm.af_product(out ptr, arr._ptr, getFNSD(dim, arr.Dimensions)));
            return(new Array(ptr));
        }
예제 #3
0
        public static SuperArray Prod(SuperArray arr, uint dim)
        {
            AFArray y = CreateMajorSupportedArray(arr);
            IntPtr  ptr;

            Internal.VERIFY(AFAlgorithm.af_product(out ptr, y._ptr, (int)dim));
            return(new SuperArray(new AFArray(ptr)));
        }
예제 #4
0
        public static SuperArray Prod(SuperArray arr, uint[] dims)
        {
            AFArray y = CreateMajorSupportedArray(arr);

            IntPtr ptr = IntPtr.Zero;

            foreach (var dim in dims)
            {
                Internal.VERIFY(AFAlgorithm.af_product(out ptr, y._ptr, (int)dim));
                y._ptr = ptr;
            }

            return(new SuperArray(new AFArray(ptr)));
        }