Esempio n. 1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="weightCfg">Synapse's weight settings</param>
 /// <param name="plasticityCfg">Synapse's plasticity configuration</param>
 public SpikingSourceSTInhibitorySettings(URandomValueSettings weightCfg = null,
                                          PlasticitySTInhibitorySettings plasticityCfg = null
                                          )
 {
     WeightCfg     = weightCfg == null ? new URandomValueSettings(DefaultMinWeight, DefaultMaxWeight) : (URandomValueSettings)weightCfg.DeepClone();
     PlasticityCfg = plasticityCfg == null ? new PlasticitySTInhibitorySettings() : (PlasticitySTInhibitorySettings)plasticityCfg.DeepClone();
     Check();
     return;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">Xml element containing the initialization settings</param>
        public SpikingSourceSTInhibitorySettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);
            //Parsing
            XElement weightSettingsElem = settingsElem.Elements("weight").FirstOrDefault();

            WeightCfg = weightSettingsElem == null ? new URandomValueSettings(DefaultMinWeight, DefaultMaxWeight) : new URandomValueSettings(weightSettingsElem);
            XElement plasticitySettingsElem = settingsElem.Elements("plasticity").FirstOrDefault();

            PlasticityCfg = plasticitySettingsElem == null ? new PlasticitySTInhibitorySettings() : new PlasticitySTInhibitorySettings(plasticitySettingsElem);
            Check();
            return;
        }
Esempio n. 3
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">The source instance.</param>
 public PlasticitySTInhibitorySettings(PlasticitySTInhibitorySettings source)
     : this(source.DynamicsCfg)
 {
     return;
 }