Example #1
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public DynamicSynapseSettings(DynamicSynapseSettings source)
 {
     RestingEfficacy = source.RestingEfficacy;
     TauFacilitation = source.TauFacilitation;
     TauRecovery     = source.TauRecovery;
     TauDecay        = source.TauDecay;
     WeightCfg       = null;
     if (source.WeightCfg != null)
     {
         WeightCfg = source.WeightCfg.DeepClone();
     }
     return;
 }
Example #2
0
        //Methods
        /// <summary>
        /// See the base.
        /// </summary>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            DynamicSynapseSettings cmpSettings = obj as DynamicSynapseSettings;

            if (RestingEfficacy != cmpSettings.RestingEfficacy ||
                TauFacilitation != cmpSettings.TauFacilitation ||
                TauRecovery != cmpSettings.TauRecovery ||
                TauDecay != cmpSettings.TauDecay ||
                !Equals(WeightCfg, cmpSettings.WeightCfg)
                )
            {
                return(false);
            }
            return(true);
        }
Example #3
0
        /// <summary>
        /// Creates the deep copy instance of this instance
        /// </summary>
        public DynamicSynapseSettings DeepClone()
        {
            DynamicSynapseSettings clone = new DynamicSynapseSettings(this);

            return(clone);
        }