ARGoS  3
A parallel, multi-engine simulator for swarm robotics
argos::CRandom::CCategory Class Reference

The RNG category. More...

#include <rng.h>

List of all members.

Public Member Functions

 CCategory (const std::string &str_id, UInt32 un_seed)
 Class constructor.
virtual ~CCategory ()
 Class destructor.
const std::string & GetId () const throw ()
 Returns the id of the category.
void SetId (const std::string &str_id)
 Sets the new id of the category.
UInt32 GetSeed () const
 Returns the seed of the category.
void SetSeed (UInt32 un_seed)
 Sets the new seed of the category.
CRNGCreateRNG (const std::string &str_type="mt19937")
 Creates a new RNG inside this category.
void ResetRNGs ()
 Resets the RNGs in this category.
void ReseedRNGs ()
 Sets new seed for the RNGs in this category.

Detailed Description

The RNG category.

This class stores a specific category of RNGs.

Definition at line 242 of file rng.h.


Constructor & Destructor Documentation

argos::CRandom::CCategory::CCategory ( const std::string &  str_id,
UInt32  un_seed 
)

Class constructor.

Parameters:
str_idthe id of the category.
un_seedthe seed of the category.

Definition at line 311 of file rng.cpp.

Class destructor.

Definition at line 321 of file rng.cpp.


Member Function Documentation

CRandom::CRNG * argos::CRandom::CCategory::CreateRNG ( const std::string &  str_type = "mt19937")

Creates a new RNG inside this category.

Parameters:
str_typethe type of RNG to use. By default, Mersenne Twister is used. For a list of available RNG types, see GetRNGTypes().
Returns:
the pointer to a new RNG inside this category.

Definition at line 339 of file rng.cpp.

const std::string& argos::CRandom::CCategory::GetId ( ) const throw () [inline]

Returns the id of the category.

Returns:
the id of the category.

Definition at line 263 of file rng.h.

Returns the seed of the category.

Returns:
the seed of the category.

Definition at line 278 of file rng.h.

Sets new seed for the RNGs in this category.

This method does not reset the RNGs. You must call Reset() explicitly.

See also:
Reset()

Definition at line 363 of file rng.cpp.

Resets the RNGs in this category.

Definition at line 350 of file rng.cpp.

void argos::CRandom::CCategory::SetId ( const std::string &  str_id) [inline]

Sets the new id of the category.

Parameters:
str_idthe new id of the category.

Definition at line 270 of file rng.h.

Sets the new seed of the category.

This method does not reset the RNGs. You must call Reset() explicitly.

Parameters:
un_seedthe new seed of the category.
See also:
Reset()

Definition at line 331 of file rng.cpp.


The documentation for this class was generated from the following files: