IAP GITLAB

Skip to content
Snippets Groups Projects
Commit d0d0e980 authored by ralfulrich's avatar ralfulrich
Browse files

git branch Merge branch 'master' of gitlab.ikp.kit.edu:AirShowerPhysics/corsika

parents 7ada8afc 8429946d
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ void corsika::random::RNGManager::RegisterRandomStream(std::string const& pStrea
rngs[pStreamName] = std::move(rng);
}
corsika::random::RNG& corsika::random::RNGManager::GetRandomStream(std::string const& pStreamName) {
corsika::random::RNG& corsika::random::RNGManager::GetRandomStream(
std::string const& pStreamName) {
return rngs.at(pStreamName);
}
......@@ -22,3 +23,8 @@ std::stringstream corsika::random::RNGManager::dumpState() const {
return buffer;
}
void corsika::random::RNGManager::SetSeedSeq(std::string const& pStreamName,
std::seed_seq const& pSeedSeq) {
seeds[pStreamName] = pSeedSeq;
}
......@@ -38,7 +38,12 @@ namespace corsika::random {
* into a std::stringstream.
*/
std::stringstream dumpState() const;
/**
* set seed_seq of \a pStreamName to \a pSeedSeq
*/
void SetSeedSeq(std::string const& pStreamName, std::seed_seq& const pSeedSeq);
};
} // namespace Random
} // namespace corsika::random
#endif
......@@ -21,6 +21,8 @@ SCENARIO("random-number streams can be registered and retrieved") {
THEN("an unknown sequence cannot be retrieved") {
REQUIRE_THROWS(rngManager.GetRandomStream("stream_UNKNOWN"));
}
// seeding not covered yet
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment