Ejemplo n.º 1
0
        /// <summary>
        /// Smaller or equal operator of <![CDATA[ILArray<>]]> with scalar
        /// </summary>
        /// <param name="in1">ILArray</param>
        /// <param name="in2">Scalar</param>
        /// <returns>ILLogicalArray of same size than in1, with elements having 'true' values
        /// for all corresponding elements of in1 beeing smaller or equal in2, false if they are not.
        /// </returns>
        /// <remarks>This operator is overloaded for
        /// all numeric types of <![CDATA[ILArray<>]]> for in1. The type of in2 is always double. </remarks>
        public static ILLogicalArray operator <=(ILArray <BaseT> in1, double in2)
        {
            if (false)
            {
                #region HYCALPER LOOPSTART
            }
            else if (in1 is /*!HC:inCls1*/ ILArray <double> )
            {
                return(ILMath.le(in1 as /*!HC:inCls1*/ ILArray <double>, (/*!HC:inArr2*/ double )in2));

                #endregion HYCALPER LOOPEND
                #region HYCALPER AUTO GENERATED CODE
// DO NOT EDIT INSIDE THIS REGION !! CHANGES WILL BE LOST !!
            }
            else if (in1 is  ILArray <complex> )
            {
                return(ILMath.le(in1 as  ILArray <complex>, ( complex )in2));
            }
            else if (in1 is  ILArray <byte> )
            {
                return(ILMath.le(in1 as  ILArray <byte>, ( byte )in2));

                #endregion HYCALPER AUTO GENERATED CODE
            }
            else
            {
                throw new ILArgumentTypeException("Operator '<=' is not defined for ILArrays of type "
                                                  + in1.GetType().Name);
            }
        }