Ejemplo n.º 1
0
        /// <summary>
        /// Unequalty 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 not equal in2, false if they are equal.
        /// </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.neq(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.neq(in1 as  ILArray <complex>, ( complex )in2));
            }
            else if (in1 is  ILArray <byte> )
            {
                return(ILMath.neq(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);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Unequalty operator of <![CDATA[ILArray<>]]> with <![CDATA[ILArray<>]]>
        /// </summary>
        /// <param name="in1"><![CDATA[ILArray<>]]></param>
        /// <param name="in2"><![CDATA[ILArray<>]]></param>
        /// <returns>ILLogicalArray of same size than in1, with elements having 'true' values
        /// for all corresponding elements of in1 and in2 beeing unequal, false if they are equal.
        /// </returns>
        /// <remarks>Dimension of in1 and in2 must match. This operator is overloaded for
        /// all numeric types of <![CDATA[ILArray<>]]>. The type of in1 must be the same as the
        /// type of in2.</remarks>
        public static ILLogicalArray operator !=(ILArray <BaseT> in1, ILArray <BaseT> in2)
        {
            if (object.Equals(in1, null))
            {
                if (object.Equals(in2, null))
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                if (object.Equals(in2, null))
                {
                    return(true);
                }
            }
            if (false)
            {
                #region HYCALPER LOOPSTART NEQ
            }
            else if (in1 is /*!HC:inCls1*/ ILArray <double> && in2 is /*!HC:inCls2*/ ILArray <double> )
            {
                return(ILMath.neq(in1 as /*!HC:inCls1*/ ILArray <double>, in2 as /*!HC:inCls2*/ ILArray <double>));

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

                #endregion HYCALPER AUTO GENERATED CODE
            }
            else if (in1 is ILArray <String> && in2 is ILArray <String> )
            {
                return(ILMath.neq(in1 as ILArray <String>, in2 as ILArray <String>));
            }
            else
            {
                throw new ILArgumentTypeException("Operator '!=' is not defined for ILArrays of type "
                                                  + in1.GetType().Name + " and " + in2.GetType().Name);
            }
        }