3#include <rsl/export.hpp>
5#include <Eigen/Geometry>
27RSL_EXPORT
auto rng(std::seed_seq seed_sequence = {}) -> std::mt19937&;
39template <
typename RealType>
41 static_assert(std::is_floating_point_v<RealType>,
"RealType must be a floating point type");
42 assert(lower < upper &&
"rsl::uniform_real: Lower bound be less than upper bound");
43 return std::uniform_real_distribution(lower, upper)(
rng());
56template <
typename IntType>
58 static_assert(std::is_integral_v<IntType>,
"IntType must be an integral type");
59 assert(lower <= upper &&
60 "rsl::uniform_int: Lower bound must be less than or equal to upper bound");
61 return std::uniform_int_distribution(lower, upper)(
rng());
RSL_EXPORT auto rng(std::seed_seq seed_sequence={}) -> std::mt19937 &
Get a random number generator.
auto uniform_real(RealType lower, RealType upper)
Get a uniform real number in a given range.
Definition random.hpp:40
RSL_EXPORT auto random_unit_quaternion() -> Eigen::Quaterniond
Generate a random unit quaternion of doubles.
auto uniform_int(IntType lower, IntType upper)
Get a uniform integer number in a given range.
Definition random.hpp:57