GetException() 정적인 개인적인 메소드

static private GetException ( Status status ) : System.Exception
status Status
리턴 System.Exception
예제 #1
0
파일: Log.cs 프로젝트: silky/Spreads
        /// <summary>Computes natural logarithm on an array of double precision (64-bit) floating-point elements.</summary>
        /// <param name="x">Pointer to the array of elements on which logarithm will be computed.</param>
        /// <param name="y">Pointer the array where the computed logarithms will be stored.</param>
        /// <param name="length">Length of the arrays specified by x and y.</param>
        /// <exception cref="System.NullReferenceException">If x or y is null.</exception>
        /// <exception cref="System.DataMisalignedException">If x or y is not naturally aligned.</exception>
        /// <exception cref="System.ArgumentException">If length is negative.</exception>
        public static unsafe void Log_V64f_V64f(double *x, double *y, int length)
        {
            if (length < 0)
            {
                throw new System.ArgumentException();
            }

            Status status = yepMath_Log_V64f_V64f(x, y, new System.UIntPtr(unchecked ((uint)length)));

            if (status != Status.Ok)
                throw Library.GetException(status); }
예제 #2
0
        /// <summary>Negates elements in single precision (32-bit) floating-point array.</summary>
        /// <param name="x">Pointer to the array of single precision (32-bit) floating-point elements to be negated.</param>
        /// <param name="y">Pointer to the single precision (32-bit) floating-point array to store negated elements.</param>
        /// <param name="length">Length of the arrays specified by x and y.</param>
        /// <exception cref="System.NullReferenceException">If x or y is null.</exception>
        /// <exception cref="System.DataMisalignedException">If x or y is not naturally aligned.</exception>
        /// <exception cref="System.ArgumentException">If length is negative.</exception>
        public static unsafe void Negate_V32f_V32f(float *x, float *y, int length)
        {
            if (length < 0)
            {
                throw new System.ArgumentException();
            }

            Status status = yepCore_Negate_V32f_V32f(x, y, new System.UIntPtr(unchecked ((uint)length)));

            if (status != Status.Ok)
            {
                throw Library.GetException(status);
            }
        }
예제 #3
0
        /// <summary>Computes the dot product of two vectors of single precision (32-bit) floating-point elements.</summary>
        /// <param name="x">Pointer to the first vector of elements.</param>
        /// <param name="y">Pointer to the second vector of elements.</param>
        /// <param name="length">Length of the vectors specified by x and y.</param>
        /// <exception cref="System.NullReferenceException">If x or y is null.</exception>
        /// <exception cref="System.DataMisalignedException">If x or y is not naturally aligned.</exception>
        /// <exception cref="System.ArgumentException">If length is negative.</exception>
        public static unsafe float DotProduct_V32fV32f_S32f(float *x, float *y, int length)
        {
            if (length < 0)
            {
                throw new System.ArgumentException();
            }

            float  dotProduct;
            Status status = yepCore_DotProduct_V32fV32f_S32f(x, y, out dotProduct, new System.UIntPtr(unchecked ((uint)length)));

            if (status != Status.Ok)
            {
                throw Library.GetException(status);
            }
            return(dotProduct);
        }
예제 #4
0
        /// <summary>Computes the sum of single precision (32-bit) floating-point array elements.</summary>
        /// <param name="v">Pointer to the array of elements which will be summed up.</param>
        /// <param name="length">Length of the array specified by v. If length is zero, the computed sum will be 0.</param>
        /// <exception cref="System.NullReferenceException">If v is null.</exception>
        /// <exception cref="System.DataMisalignedException">If v is not naturally aligned.</exception>
        /// <exception cref="System.ArgumentException">If length is negative.</exception>
        public static unsafe float Sum_V32f_S32f(float *v, int length)
        {
            if (length < 0)
            {
                throw new System.ArgumentException();
            }

            float  sum;
            Status status = yepCore_Sum_V32f_S32f(v, out sum, new System.UIntPtr(unchecked ((uint)length)));

            if (status != Status.Ok)
            {
                throw Library.GetException(status);
            }
            return(sum);
        }
예제 #5
0
        /// <summary>Evaluates polynomial with single precision (32-bit) floating-point coefficients on an array of single precision (32-bit) floating-point elements.</summary>
        /// <param name="x">Pointer to the array of elements on which the polynomial will be evaluated.</param>
        /// <param name="coef">Pointer to the array of polynomial coefficients.</param>
        /// <param name="y">Pointer the array where the result of polynomial evaluation will be stored.</param>
        /// <param name="coefCount">Number of polynomial coefficients. Should equal the polynomial degree plus one.</param>
        /// <param name="length">Length of the arrays specified by x and y.</param>
        /// <exception cref="System.NullReferenceException">If coef, x or y is null.</exception>
        /// <exception cref="System.DataMisalignedException">If coef, x or y is not naturally aligned.</exception>
        /// <exception cref="System.ArgumentException">If coefCount or length is negative or coefCount is zero.</exception>
        public static unsafe void EvaluatePolynomial_V32fV32f_V32f(float *coef, float *x, float *y, int coefCount, int length)
        {
            if (coefCount < 0)
            {
                throw new System.ArgumentException();
            }

            if (length < 0)
            {
                throw new System.ArgumentException();
            }

            Status status = yepMath_EvaluatePolynomial_V32fV32f_V32f(coef, x, y, new System.UIntPtr(unchecked ((uint)coefCount)), new System.UIntPtr(unchecked ((uint)length)));

            if (status != Status.Ok)
            {
                throw Library.GetException(status);
            }
        }