예제 #1
0
        private void btnReproFuncs_Click(object sender, EventArgs e)
        {
            List <double> probabilities = _settings.ReproductionFuncProbabilities;
            List <string> names         = ReproductionFunction.FunctionNames;

            DistributionBox.DistributionInfo info = DistributionBox.ShowDistribution(
                this.Parent,
                "Reproduction",
                "Reproduction function distribution",
                names.Select((string name, int i) => new Tuple <string, double>(name, probabilities[i])).ToList(),
                150
                );
            if (info != null)
            {
                Settings.ReproductionFuncProbabilities = info.Values;
            }
        }
예제 #2
0
        private void btnMutationFuncs_Click(object sender, System.EventArgs e)
        {
            List <double> probabilities = _settings.MutationFunctionProbabilities;
            List <string> names         = MutationFunction.FunctionNames;

            DistributionBox.DistributionInfo info = DistributionBox.ShowDistribution(
                this.Parent,
                "Mutation",
                "Mutation function distribution",
                names.Select((string name, int i) => new Tuple <string, double>(name, probabilities[i])).ToList(),
                150,
                "Mutation temperature",
                _settings.MutationTemperature
                );
            if (info != null)
            {
                Settings.MutationFunctionProbabilities = info.Values;
                Settings.MutationTemperature           = info.ExtraValue;
            }
        }