Esempio n. 1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="spikingTargetCfg">The configuration of a synapse connecting postsynaptic hidden spiking neuron.</param>
 /// <param name="analogTargetCfg">The configuration of a synapse connecting postsynaptic hidden analog neuron.</param>
 public SynapseSettings(SynapseSTSettings spikingTargetCfg = null,
                        SynapseATSettings analogTargetCfg  = null
                        )
 {
     SpikingTargetCfg = spikingTargetCfg == null ? new SynapseSTSettings() : (SynapseSTSettings)spikingTargetCfg.DeepClone();
     AnalogTargetCfg  = analogTargetCfg == null ? new SynapseATSettings() : (SynapseATSettings)analogTargetCfg.DeepClone();
     Check();
     return;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">A xml element containing the configuration data.</param>
        public SynapseSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);
            //Parsing
            XElement cfgElem;

            //Plasticity
            cfgElem          = settingsElem.Elements("spikingTarget").FirstOrDefault();
            SpikingTargetCfg = cfgElem == null ? new SynapseSTSettings() : new SynapseSTSettings(cfgElem);
            cfgElem          = settingsElem.Elements("analogTarget").FirstOrDefault();
            AnalogTargetCfg  = cfgElem == null ? new SynapseATSettings() : new SynapseATSettings(cfgElem);
            Check();
            return;
        }
Esempio n. 3
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public SynapseATSettings(SynapseATSettings source)
     : this(source.SpectralRadius, source.InputSynCfg, source.IndifferentSynCfg)
 {
     return;
 }