mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Add --no-randomise-duplicates option
This commit is contained in:
parent
18f0d6eb94
commit
2563e7a7e3
@ -294,6 +294,13 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription()
|
|||||||
po::value<Algorithm>()->value_name("<NAME>")->default_value(Algorithm::GEWEP),
|
po::value<Algorithm>()->value_name("<NAME>")->default_value(Algorithm::GEWEP),
|
||||||
"Algorithm"
|
"Algorithm"
|
||||||
)
|
)
|
||||||
|
(
|
||||||
|
"no-randomise-duplicates",
|
||||||
|
po::bool_switch(),
|
||||||
|
"By default, after each round of the algorithm duplicate chromosomes are removed from"
|
||||||
|
"the population and replaced with randomly generated ones. "
|
||||||
|
"This option disables this postprocessing."
|
||||||
|
)
|
||||||
(
|
(
|
||||||
"min-chromosome-length",
|
"min-chromosome-length",
|
||||||
po::value<size_t>()->value_name("<NUM>")->default_value(12),
|
po::value<size_t>()->value_name("<NUM>")->default_value(12),
|
||||||
@ -438,9 +445,9 @@ AlgorithmRunner::Options Phaser::buildAlgorithmRunnerOptions(po::variables_map c
|
|||||||
return {
|
return {
|
||||||
_arguments.count("rounds") > 0 ? static_cast<optional<size_t>>(_arguments["rounds"].as<size_t>()) : nullopt,
|
_arguments.count("rounds") > 0 ? static_cast<optional<size_t>>(_arguments["rounds"].as<size_t>()) : nullopt,
|
||||||
_arguments.count("population-autosave") > 0 ? static_cast<optional<string>>(_arguments["population-autosave"].as<string>()) : nullopt,
|
_arguments.count("population-autosave") > 0 ? static_cast<optional<string>>(_arguments["population-autosave"].as<string>()) : nullopt,
|
||||||
false,
|
!_arguments["no-randomise-duplicates"].as<bool>(),
|
||||||
nullopt,
|
_arguments["min-chromosome-length"].as<size_t>(),
|
||||||
nullopt,
|
_arguments["max-chromosome-length"].as<size_t>(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user