16 #include <argos3/core/utility/math/angles.h>
17 #include <argos3/core/utility/math/range.h>
243 inline const std::string&
GetId()
const throw() {
250 void SetId(
const std::string& str_id) {
290 std::vector<CRNG*> m_vecRNGList;
311 static CCategory&
GetCategory(
const std::string& str_category);
331 static CRNG*
CreateRNG(
const std::string& str_category);
347 static void SetSeedOf(
const std::string& str_category,
357 static std::map<std::string, CCategory*> m_mapCategories;
bool Bernoulli(Real f_true=0.5)
Returns a random value from a Bernoulli distribution.
signed int SInt32
32-bit signed integer.
void ResetRNGs()
Resets the RNGs in this category.
virtual ~CCategory()
Class destructor.
UInt32 GetSeed() const
Returns the seed of this RNG.
float Real
Collects all ARGoS code.
void SetId(const std::string &str_id)
Sets the new id of the category.
static UInt32 GetSeedOf(const std::string &str_category)
Returns the seed of the wanted category.
Real Lognormal(Real f_sigma, Real f_mu)
Returns a random value from a Lognormal distribution.
void ReseedRNGs()
Sets new seed for the RNGs in this category.
The ARGoS random number generator.
void Reset()
Reset the RNG.
virtual ~CRNG()
Class destructor.
It defines the basic type CRadians, used to store an angle value in radians.
static void Reset()
Resets all the RNG categories.
unsigned int UInt32
32-bit unsigned integer.
CRadians Uniform(const CRange< CRadians > &c_range)
Returns a random value from a uniform distribution.
CRNG(UInt32 un_seed)
Class constructor.
CCategory(const std::string &str_id, UInt32 un_seed)
Class constructor.
CRNG * CreateRNG()
Creates a new RNG inside this category.
static void RemoveCategory(const std::string &str_category)
Removes the wanted category.
static CCategory & GetCategory(const std::string &str_category)
Returns a reference to the wanted category.
static bool ExistsCategory(const std::string &str_category)
Returns true if the given category exists in the pool.
Real Exponential(Real f_mean)
Returns a random value from an exponential distribution.
Real Gaussian(Real f_std_dev, Real f_mean=0.0f)
Returns a random value from a Gaussian distribution.
void SetSeed(UInt32 un_seed)
Sets the seed of this RNG.
static CRNG * CreateRNG(const std::string &str_category)
Creates a new RNG inside the given category.
void SetSeed(UInt32 un_seed)
Sets the new seed of the category.
static bool CreateCategory(const std::string &str_category, UInt32 un_seed)
Creates a new category.
UInt32 GetSeed() const
Returns the seed of the category.
The namespace containing all the ARGoS related code.
Real Rayleigh(Real f_sigma)
Returns a random value from a Rayleigh distribution.
static void SetSeedOf(const std::string &str_category, UInt32 un_seed)
Sets the new seed of the wanted category.
const std::string & GetId() const
Returns the id of the category.