add seed option
This commit is contained in:
@@ -33,8 +33,13 @@ int main (const int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
|
std::mt19937_64 rng;
|
||||||
|
if (parameter.count("seed")) {
|
||||||
|
rng.seed(static_cast<uint64_t>(parameter.at("seed")));
|
||||||
|
} else {
|
||||||
std::random_device rd;
|
std::random_device rd;
|
||||||
std::mt19937_64 rng(rd());
|
rng.seed(rd());
|
||||||
|
}
|
||||||
|
|
||||||
motions::BaseMotion *motion = motions::BaseMotion::createFromInput(args.motion_type, rng);
|
motions::BaseMotion *motion = motions::BaseMotion::createFromInput(args.motion_type, rng);
|
||||||
times::BaseDistribution *dist = times::BaseDistribution::createFromInput(args.distribution_type, rng);
|
times::BaseDistribution *dist = times::BaseDistribution::createFromInput(args.distribution_type, rng);
|
||||||
|
|||||||
Reference in New Issue
Block a user