Beispiel #1
0
 //Constructors
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public InputSynapseSettings(InputSynapseSettings source)
 {
     SpikingTargetScope     = source.SpikingTargetScope;
     SpikingTargetWeightCfg = null;
     if (source.SpikingTargetWeightCfg != null)
     {
         SpikingTargetWeightCfg = source.SpikingTargetWeightCfg.DeepClone();
     }
     AnalogTargetScope     = source.AnalogTargetScope;
     AnalogTargetWeightCfg = null;
     if (source.AnalogTargetWeightCfg != null)
     {
         AnalogTargetWeightCfg = source.AnalogTargetWeightCfg.DeepClone();
     }
     DelayMethod = source.DelayMethod;
     MaxDelay    = source.MaxDelay;
     return;
 }
Beispiel #2
0
        //Methods
        /// <summary>
        /// See the base.
        /// </summary>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            InputSynapseSettings cmpSettings = obj as InputSynapseSettings;

            if (SpikingTargetScope != cmpSettings.SpikingTargetScope ||
                !Equals(SpikingTargetWeightCfg, cmpSettings.SpikingTargetWeightCfg) ||
                AnalogTargetScope != cmpSettings.AnalogTargetScope ||
                !Equals(AnalogTargetWeightCfg, cmpSettings.AnalogTargetWeightCfg) ||
                DelayMethod != cmpSettings.DelayMethod ||
                MaxDelay != cmpSettings.MaxDelay
                )
            {
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        /// <summary>
        /// Creates the deep copy instance of this instance
        /// </summary>
        public InputSynapseSettings DeepClone()
        {
            InputSynapseSettings clone = new InputSynapseSettings(this);

            return(clone);
        }