Beispiel #1
0
 /// <summary>
 /// The deep copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public TNRNetClusterSingleBoolWeightsSettings(TNRNetClusterSingleBoolWeightsSettings source)
     : this(source.TrainingGroupWeight, source.TestingGroupWeight, source.SamplesWeight,
            source.NumericalPrecisionWeight, source.MisrecognizedFalseWeight,
            source.UnrecognizedTrueWeight)
 {
     return;
 }
Beispiel #2
0
 //Constructors
 /// <summary>
 /// Creates an unitialized instance.
 /// </summary>
 /// <param name="networksCfg">The configuration of the cluster networks.</param>
 /// <param name="weightsCfg">The configuration of the macro-weights.</param>
 public TNRNetClusterSingleBoolSettings(TNRNetClusterSingleBoolNetworksSettings networksCfg,
                                        TNRNetClusterSingleBoolWeightsSettings weightsCfg
                                        )
 {
     NetworksCfg = (TNRNetClusterSingleBoolNetworksSettings)networksCfg.DeepClone();
     WeightsCfg  = (TNRNetClusterSingleBoolWeightsSettings)weightsCfg.DeepClone();
     Check();
     return;
 }
Beispiel #3
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">A xml element containing the configuration data.</param>
        public TNRNetClusterSingleBoolSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            NetworksCfg = new TNRNetClusterSingleBoolNetworksSettings(settingsElem.Element("networks"));
            WeightsCfg  = new TNRNetClusterSingleBoolWeightsSettings(settingsElem.Element("weights"));
            Check();
            return;
        }