argos::CRandom::CCategory Class Reference

The RNG category. More...

#include <rng.h>

Public Member Functions

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

Detailed Description

The RNG category.

This class stores a specific category of RNGs.

Definition at line 222 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 215 of file rng.cpp.

argos::CRandom::CCategory::~CCategory ( )
virtual

Class destructor.

Definition at line 225 of file rng.cpp.

Member Function Documentation

CRandom::CRNG * argos::CRandom::CCategory::CreateRNG ( )

Creates a new RNG inside this category.

Returns
the pointer to a new RNG inside this category.

Definition at line 243 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 243 of file rng.h.

UInt32 argos::CRandom::CCategory::GetSeed ( ) const
inline

Returns the seed of the category.

Returns
the seed of the category.

Definition at line 258 of file rng.h.

void argos::CRandom::CCategory::ReseedRNGs ( )

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 267 of file rng.cpp.

void argos::CRandom::CCategory::ResetRNGs ( )

Resets the RNGs in this category.

Definition at line 254 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 250 of file rng.h.

void argos::CRandom::CCategory::SetSeed ( UInt32  un_seed)

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 235 of file rng.cpp.