From 247fcc370d9dc263930e63020b9ee1e729335961 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Tue, 4 Dec 2018 11:57:18 -0600 Subject: [PATCH] Add accessor for MonteVarRandom::randist Closes #715 --- include/trick/MonteVarRandom.hh | 7 +++++++ trick_source/sim_services/MonteCarlo/MonteVarRandom.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/include/trick/MonteVarRandom.hh b/include/trick/MonteVarRandom.hh index 33aaf550..12867c45 100644 --- a/include/trick/MonteVarRandom.hh +++ b/include/trick/MonteVarRandom.hh @@ -185,6 +185,13 @@ namespace Trick { */ double get_absolute_max() const { return (randist.rel_max) ? (randist.mu + randist.max) : randist.max; } + /** + * gets the random distribution + * + * @return the random distribution + */ + const TRICK_GSL_RANDIST& get_random_distribution(); + // Describes the properties of this variable. std::string describe_variable(); diff --git a/trick_source/sim_services/MonteCarlo/MonteVarRandom.cpp b/trick_source/sim_services/MonteCarlo/MonteVarRandom.cpp index 398b28b7..861b350a 100644 --- a/trick_source/sim_services/MonteCarlo/MonteVarRandom.cpp +++ b/trick_source/sim_services/MonteCarlo/MonteVarRandom.cpp @@ -240,3 +240,7 @@ Trick::MonteVarRandom::updateStlRandom() { } } } + +const TRICK_GSL_RANDIST& Trick::MonteVarRandom::get_random_distribution() { + return randist; +}