예제 #1
0
 //Constructor
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 public PredictorsParamsSettings()
 {
     ActivationFadingSumCfg = new ActivationFadingSumSettings();
     ActivationMWAvgCfg     = new ActivationMWAvgSettings();
     FiringFadingSumCfg     = new FiringFadingSumSettings();
     FiringMWAvgCfg         = new FiringMWAvgSettings();
     FiringCountCfg         = new FiringCountSettings();
     FiringBinPatternCfg    = new FiringBinPatternSettings();
     return;
 }
예제 #2
0
        /// <summary>
        /// Creates initialized instance using xml element
        /// </summary>
        /// <param name="elem">Xml element containing settings</param>
        public PredictorsParamsSettings(XElement elem)
            : this()
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            foreach (PredictorsProvider.PredictorID predictorID in typeof(PredictorsProvider.PredictorID).GetEnumValues())
            {
                XElement predictorElem = settingsElem.Elements(PredictorsSettings.GetXmlName(predictorID)).FirstOrDefault();
                if (predictorElem != null)
                {
                    switch (predictorID)
                    {
                    case PredictorsProvider.PredictorID.ActivationFadingSum:
                        ActivationFadingSumCfg = new ActivationFadingSumSettings(predictorElem);
                        break;

                    case PredictorsProvider.PredictorID.ActivationMWAvg:
                        ActivationMWAvgCfg = new ActivationMWAvgSettings(predictorElem);
                        break;

                    case PredictorsProvider.PredictorID.FiringFadingSum:
                        FiringFadingSumCfg = new FiringFadingSumSettings(predictorElem);
                        break;

                    case PredictorsProvider.PredictorID.FiringMWAvg:
                        FiringMWAvgCfg = new FiringMWAvgSettings(predictorElem);
                        break;

                    case PredictorsProvider.PredictorID.FiringCount:
                        FiringCountCfg = new FiringCountSettings(predictorElem);
                        break;

                    case PredictorsProvider.PredictorID.FiringBinPattern:
                        FiringBinPatternCfg = new FiringBinPatternSettings(predictorElem);
                        break;

                    default:
                        break;
                    }
                }
            }
            return;
        }
예제 #3
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public FiringCountSettings(FiringCountSettings source)
 {
     Window = source.Window;
     return;
 }