Beispiel #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;
 }
Beispiel #2
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public PredictorsParamsSettings(PredictorsParamsSettings source)
 {
     ActivationFadingSumCfg = (ActivationFadingSumSettings)source.ActivationFadingSumCfg.DeepClone();
     ActivationMWAvgCfg     = (ActivationMWAvgSettings)source.ActivationMWAvgCfg.DeepClone();
     FiringFadingSumCfg     = (FiringFadingSumSettings)source.FiringFadingSumCfg.DeepClone();
     FiringMWAvgCfg         = (FiringMWAvgSettings)source.FiringMWAvgCfg.DeepClone();
     FiringCountCfg         = (FiringCountSettings)source.FiringCountCfg.DeepClone();
     FiringBinPatternCfg    = (FiringBinPatternSettings)source.FiringBinPatternCfg.DeepClone();
     return;
 }
Beispiel #3
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;
        }
Beispiel #4
0
        /// <summary>
        /// Creates an initialized instance
        /// </summary>
        /// <param name="predictorParamsSettings">Predictor specific parameters settings</param>
        public PredictorsParamsSettings(params IPredictorParamsSettings[] predictorParamsSettings)
            : this()
        {
            foreach (IPredictorParamsSettings settings in predictorParamsSettings)
            {
                switch (settings.ID)
                {
                case PredictorsProvider.PredictorID.ActivationFadingSum:
                    ActivationFadingSumCfg = (ActivationFadingSumSettings)settings;
                    break;

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

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

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

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

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

                default:
                    break;
                }
            }
            return;
        }
Beispiel #5
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public FiringBinPatternSettings(FiringBinPatternSettings source)
 {
     Window = source.Window;
     return;
 }