//Constructors /// <summary> /// Creates an initialized instance. /// </summary> /// <param name="inputSynCfg">The configuration of an input synapse.</param> /// <param name="excitatorySynCfg">The configuration of an excitatory synapse.</param> /// <param name="inhibitorySynCfg">The configuration of an inhibitory synapse.</param> public SynapseSTSettings(SynapseSTInputSettings inputSynCfg = null, SynapseSTExcitatorySettings excitatorySynCfg = null, SynapseSTInhibitorySettings inhibitorySynCfg = null ) { InputSynCfg = inputSynCfg == null ? new SynapseSTInputSettings() : (SynapseSTInputSettings)inputSynCfg.DeepClone(); ExcitatorySynCfg = excitatorySynCfg == null ? new SynapseSTExcitatorySettings() : (SynapseSTExcitatorySettings)excitatorySynCfg.DeepClone(); InhibitorySynCfg = inhibitorySynCfg == null ? new SynapseSTInhibitorySettings() : (SynapseSTInhibitorySettings)inhibitorySynCfg.DeepClone(); Check(); return; }
/// <summary> /// Creates an initialized instance. /// </summary> /// <param name="elem">A xml element containing the configuration data.</param> public SynapseSTSettings(XElement elem) { //Validation XElement settingsElem = Validate(elem, XsdTypeName); //Parsing XElement inputSynElem = settingsElem.Elements("input").FirstOrDefault(); InputSynCfg = inputSynElem == null ? new SynapseSTInputSettings() : new SynapseSTInputSettings(inputSynElem); XElement excitatorySynElem = settingsElem.Elements("excitatory").FirstOrDefault(); ExcitatorySynCfg = excitatorySynElem == null ? new SynapseSTExcitatorySettings() : new SynapseSTExcitatorySettings(excitatorySynElem); XElement inhibitorySynElem = settingsElem.Elements("inhibitory").FirstOrDefault(); InhibitorySynCfg = inhibitorySynElem == null ? new SynapseSTInhibitorySettings() : new SynapseSTInhibitorySettings(inhibitorySynElem); Check(); return; }
/// <summary> /// The deep copy constructor. /// </summary> /// <param name="source">The source instance.</param> public SynapseSTInhibitorySettings(SynapseSTInhibitorySettings source) : this(source.DelayMethod, source.MaxDelay, source.RelShare, source.AnalogSourceCfg, source.SpikingSourceCfg) { return; }