示例#1
0
        public override bool Equals(object obj)
        {
            if (!(obj is GeneticAlgorithmConfig))
            {
                return(false);
            }
            var tmp = (GeneticAlgorithmConfig)obj;

            return(obj.GetType() == GetType() &&
                   PercentToSelect == tmp.PercentToSelect &&
                   MutationChance == tmp.MutationChance &&
                   ParentMethod == tmp.ParentMethod &&
                   RandOptions.Equals(tmp.RandOptions));
        }
示例#2
0
 public void Reinitialize()
 {
     ParentChances = ParentChoosingFactory.Get(ParentMethod);
     RandOptions.Reinitialize();
 }