public GeneticSettings(float percSurv, float percRand, int popCount, OrderOfEvolution evol)
        {
            (percSurv > 0 && percSurv <= 1).AssertTrue();
            (percRand > 0 && percRand <= 1).AssertTrue();
            (percRand < percSurv).AssertTrue();
            (popCount > 0).AssertTrue();

            this.PercentageSurvivors        = percSurv;
            this.PercenetageRandomSurvivors = percRand;
            this.PopulationCount            = popCount;

            this.OrderOfEvolutionMethods = evol;
        }
Esempio n. 2
0
        public GeneticSettings(float percSurv, float percRand, int popCount, OrderOfEvolution evol)
        {
            (percSurv > 0 && percSurv <= 1).AssertTrue();
            (percRand > 0 && percRand <= 1).AssertTrue();
            (percRand < percSurv).AssertTrue();
            (popCount > 0).AssertTrue();

            this.PercentageSurvivors = percSurv;
            this.PercenetageRandomSurvivors = percRand;
            this.PopulationCount = popCount;

            this.OrderOfEvolutionMethods = evol;
        }