示例#1
0
        /** @copydoc LayerParameterBase::Clone */
        public override LayerParameterBase Clone()
        {
            EluParameter p = new EluParameter();

            p.Copy(this);
            return(p);
        }
示例#2
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            base.Copy(src);

            if (src is EluParameter)
            {
                EluParameter p = (EluParameter)src;
                m_dfAlpha = p.m_dfAlpha;
            }
        }
示例#3
0
        /** @copydoc LayerParameterBase::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto     proto = RawProto.Parse(br.ReadString());
            EluParameter p     = FromProto(proto);

            if (!bNewInstance)
            {
                Copy(p);
            }

            return(p);
        }
示例#4
0
        /// <summary>
        /// Parses the parameter from a RawProto.
        /// </summary>
        /// <param name="rp">Specifies the RawProto to parse.</param>
        /// <returns>A new instance of the parameter is returned.</returns>
        public static EluParameter FromProto(RawProto rp)
        {
            string       strVal;
            EluParameter p = new EluParameter();

            if ((strVal = rp.FindValue("alpha")) != null)
            {
                p.alpha = double.Parse(strVal);
            }

            return(p);
        }
示例#5
0
        /// <summary>
        /// Parses the parameter from a RawProto.
        /// </summary>
        /// <param name="rp">Specifies the RawProto to parse.</param>
        /// <returns>A new instance of the parameter is returned.</returns>
        public static new EluParameter FromProto(RawProto rp)
        {
            string       strVal;
            EluParameter p = new EluParameter();

            ((EngineParameter)p).Copy(EngineParameter.FromProto(rp));

            if ((strVal = rp.FindValue("alpha")) != null)
            {
                p.alpha = ParseDouble(strVal);
            }

            return(p);
        }
示例#6
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            EluParameter p = (EluParameter)src;

            m_dfAlpha = p.m_dfAlpha;
        }