コード例 #1
0
ファイル: DefaultNetworksSettings.cs プロジェクト: thild/NET
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="classificationNetworksCfg">Default classification networks settings</param>
 /// <param name="forecastNetworksCfg">Default forecast networks settings</param>
 public DefaultNetworksSettings(ClassificationNetworksSettings classificationNetworksCfg = null,
                                ForecastNetworksSettings forecastNetworksCfg             = null
                                )
 {
     ClassificationNetworksCfg = classificationNetworksCfg == null ? new ClassificationNetworksSettings() : (ClassificationNetworksSettings)classificationNetworksCfg.DeepClone();
     ForecastNetworksCfg       = forecastNetworksCfg == null ? new ForecastNetworksSettings() : (ForecastNetworksSettings)forecastNetworksCfg.DeepClone();
     return;
 }
コード例 #2
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">Source instance</param>
 public ClassificationNetworksSettings(ClassificationNetworksSettings source)
     : this()
 {
     foreach (INonRecurrentNetworkSettings netCfg in source.NetworkCfgCollection)
     {
         NetworkCfgCollection.Add((INonRecurrentNetworkSettings)netCfg.DeepClone());
     }
     return;
 }
コード例 #3
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="oneWinnerGroupName">Specifies membership to "one winner" group of given name or no membership if default "NA" name is used</param>
 /// <param name="networksCfg">Classifying networks settings</param>
 public ClassificationTaskSettings(string oneWinnerGroupName = DefaultOneWinnerGroupName,
                                   ClassificationNetworksSettings networksCfg = null
                                   )
 {
     OneWinnerGroupName = oneWinnerGroupName;
     NetworksCfg        = networksCfg == null ? new ClassificationNetworksSettings() : (ClassificationNetworksSettings)networksCfg.DeepClone();
     Check();
     return;
 }
コード例 #4
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">Xml element containing the initialization settings</param>
        public ClassificationTaskSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            OneWinnerGroupName = settingsElem.Attribute("oneWinnerGroupName").Value;
            //Networks
            XElement classificationNetworksSettingsElem = settingsElem.Elements("networks").FirstOrDefault();

            NetworksCfg = classificationNetworksSettingsElem == null ? new ClassificationNetworksSettings() : new ClassificationNetworksSettings(classificationNetworksSettingsElem);
            Check();
            return;
        }