/// <summary> /// The deep copy constructor /// </summary> /// <param name="source">Source instance</param> public ParallelPerceptronSettings(ParallelPerceptronSettings source) { NumOfGates = source.NumOfGates; Resolution = source.Resolution; PDeltaRuleTrainerCfg = null; if (source.PDeltaRuleTrainerCfg != null) { PDeltaRuleTrainerCfg = source.PDeltaRuleTrainerCfg.DeepClone(); } return; }
//Methods /// <summary> /// See the base. /// </summary> public override bool Equals(object obj) { if (obj == null) { return(false); } ParallelPerceptronSettings cmpSettings = obj as ParallelPerceptronSettings; if (NumOfGates != cmpSettings.NumOfGates || Resolution != cmpSettings.Resolution || (PDeltaRuleTrainerCfg == null && cmpSettings.PDeltaRuleTrainerCfg != null) || (PDeltaRuleTrainerCfg != null && cmpSettings.PDeltaRuleTrainerCfg == null) || (PDeltaRuleTrainerCfg != null && !PDeltaRuleTrainerCfg.Equals(cmpSettings.PDeltaRuleTrainerCfg)) ) { return(false); } return(true); }
/// <summary> /// Creates an initialized instance /// </summary> /// <param name="numOfInputs">Number of input values</param> /// <param name="settings">Configuration parameters</param> public ParallelPerceptron(int numOfInputs, ParallelPerceptronSettings settings) : this(numOfInputs, settings.NumOfGates, settings.Resolution) { return; }
/// <summary> /// Creates the deep copy instance of this instance /// </summary> public ParallelPerceptronSettings DeepClone() { ParallelPerceptronSettings clone = new ParallelPerceptronSettings(this); return(clone); }