Ejemplo 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 SpikingSourceSTExcitatorySettings(URandomValueSettings weightCfg = null,
                                          PlasticitySTExcitatorySettings plasticityCfg = null
                                          )
 {
     WeightCfg     = weightCfg == null ? new URandomValueSettings(DefaultMinWeight, DefaultMaxWeight) : (URandomValueSettings)weightCfg.DeepClone();
     PlasticityCfg = plasticityCfg == null ? new PlasticitySTExcitatorySettings() : (PlasticitySTExcitatorySettings)plasticityCfg.DeepClone();
     Check();
     return;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">Xml element containing the initialization settings</param>
        public SpikingSourceSTExcitatorySettings(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 PlasticitySTExcitatorySettings() : new PlasticitySTExcitatorySettings(plasticitySettingsElem);
            Check();
            return;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// The deep copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public PlasticitySTExcitatorySettings(PlasticitySTExcitatorySettings source)
     : this(source.DynamicsCfg)
 {
     return;
 }