Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
basic::random::RandomGeneratorSettings Class Reference

A class to store settings from the options system for the random generator. Moved from core to basic. More...

#include <RandomGeneratorSettings.hh>

Inheritance diagram for basic::random::RandomGeneratorSettings:
Inheritance graph
[legend]

Public Member Functions

 RandomGeneratorSettings ()
 
void initialize_from_options (utility::options::OptionCollection const &options)
 
int seed () const
 
int seed_offset () const
 
bool const_seed () const
 
bool use_time_as_seed () const
 
std::string const & random_device_name () const
 
std::string const & rng_type () const
 
bool mpi_bcast_seed_from_node0 () const
 
void seed (int setting)
 
void seed_offset (int setting)
 
void const_seed (bool setting)
 
void use_time_as_seed (bool setting)
 
void random_device_name (std::string const &setting)
 
void rng_type (std::string const &setting)
 
void mpi_bcast_seed_from_node0 (bool setting)
 It is important that calls to determine_random_seed with this value set to true (the default!) only occur when all nodes will reach this function at the same time with no intervening mpi calls. Beware if in a multithreaded context if a seed is set more than once (e.g. after each thread launches) as it can produce MPI-deadlock. More...
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
virtual ~ReferenceCount ()
 

Static Public Member Functions

static void list_options_read (utility::options::OptionKeyList &opt_keys)
 

Private Attributes

int seed_
 
int seed_offset_
 
bool const_seed_
 
bool use_time_as_seed_
 
std::string random_device_name_
 
std::string rng_type_
 
bool mpi_bcast_seed_from_node0_
 

Additional Inherited Members

- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 

Detailed Description

A class to store settings from the options system for the random generator. Moved from core to basic.

Author
Original author unknown. Moved from core to basic by Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

Constructor & Destructor Documentation

basic::random::RandomGeneratorSettings::RandomGeneratorSettings ( )

Member Function Documentation

bool basic::random::RandomGeneratorSettings::const_seed ( ) const

References const_seed_.

void basic::random::RandomGeneratorSettings::const_seed ( bool  setting)

References const_seed_.

void basic::random::RandomGeneratorSettings::initialize_from_options ( utility::options::OptionCollection const &  options)
void basic::random::RandomGeneratorSettings::list_options_read ( utility::options::OptionKeyList opt_keys)
static
bool basic::random::RandomGeneratorSettings::mpi_bcast_seed_from_node0 ( ) const
void basic::random::RandomGeneratorSettings::mpi_bcast_seed_from_node0 ( bool  setting)

It is important that calls to determine_random_seed with this value set to true (the default!) only occur when all nodes will reach this function at the same time with no intervening mpi calls. Beware if in a multithreaded context if a seed is set more than once (e.g. after each thread launches) as it can produce MPI-deadlock.

References mpi_bcast_seed_from_node0_.

std::string const & basic::random::RandomGeneratorSettings::random_device_name ( ) const

References random_device_name_.

void basic::random::RandomGeneratorSettings::random_device_name ( std::string const &  setting)

References random_device_name_.

std::string const & basic::random::RandomGeneratorSettings::rng_type ( ) const
void basic::random::RandomGeneratorSettings::rng_type ( std::string const &  setting)

References rng_type_.

int basic::random::RandomGeneratorSettings::seed ( ) const

References seed_.

void basic::random::RandomGeneratorSettings::seed ( int  setting)

References seed_.

int basic::random::RandomGeneratorSettings::seed_offset ( ) const

References seed_offset_.

void basic::random::RandomGeneratorSettings::seed_offset ( int  setting)

References seed_offset_.

bool basic::random::RandomGeneratorSettings::use_time_as_seed ( ) const

References use_time_as_seed_.

void basic::random::RandomGeneratorSettings::use_time_as_seed ( bool  setting)

References use_time_as_seed_.

Member Data Documentation

bool basic::random::RandomGeneratorSettings::const_seed_
private
bool basic::random::RandomGeneratorSettings::mpi_bcast_seed_from_node0_
private
std::string basic::random::RandomGeneratorSettings::random_device_name_
private
std::string basic::random::RandomGeneratorSettings::rng_type_
private
int basic::random::RandomGeneratorSettings::seed_
private

Referenced by initialize_from_options(), and seed().

int basic::random::RandomGeneratorSettings::seed_offset_
private
bool basic::random::RandomGeneratorSettings::use_time_as_seed_
private

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