From d44e762bf7b010e42456d8ea8a63a9bf6d58110b Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sun, 8 Mar 2026 10:47:39 +0100 Subject: [PATCH] add seed option --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ae699a0..a249a8c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,8 +33,13 @@ int main (const int argc, char *argv[]) { } std::cout << std::endl; - std::random_device rd; - std::mt19937_64 rng(rd()); + std::mt19937_64 rng; + if (parameter.count("seed")) { + rng.seed(static_cast(parameter.at("seed"))); + } else { + std::random_device rd; + rng.seed(rd()); + } motions::BaseMotion *motion = motions::BaseMotion::createFromInput(args.motion_type, rng); times::BaseDistribution *dist = times::BaseDistribution::createFromInput(args.distribution_type, rng);