SUNphi  1.0
SUNphi::MasterRandomGenerator Class Reference

Master random generator. More...

#include <MasterRandomGenerator.hpp>

Inheritance diagram for SUNphi::MasterRandomGenerator:
SUNphi::SerializableClass< MasterRandomGenerator >

Public Member Functions

auto serializableMembers ()
 
auto serializableMembers () const
 
void reset ()
 Reset the number generator to the initial state.
 
void skip (const int n)
 Skip n elements.
 
 MasterRandomGenerator ()
 Fills _seeds using the true random generator.
 
MasterRandomGeneratoroperator~ ()
 
const MasterRandomGeneratoroperator~ () const
 
bool isDefault () const
 Check if the class is default. More...
 
YAML::Node serialize (YAML::Node &node, const bool &onlyNonDefault=false) const
 Convert to YAML node. More...
 
YAML::Node serialize (const bool &onlyNonDefault=false) const
 Convert to YAML node. More...
 
void putToDefault ()
 Put the class to the default value.
 
void checkNoSpuriousSubNodes (const YAML::Node &node)
 Check that no spurious subnodes are contained. More...
 
bool deSerialize (const YAML::Node &node)
 Convert from a YAML node. More...
 
Binarizerbinarize (B &&out={}) const
 Convert to binary. More...
 
BinarizerdeBinarize (B &&in)
 Convert from binary. More...
 

Private Types

using Base = _MasterRandomGenerator
 Base random generator.
 

Private Attributes

Serializable< std::vector< uint64_t > > _seeds { "Seeds" , nSeeds }
 Seed state.
 
const std::vector< uint64_t > & seeds
 Constant access to the seeds. More...
 

Static Private Attributes

static constexpr int nSeeds
 Number of seeds needed to initialize the state. More...
 

Detailed Description

Master random generator.

Definition at line 21 of file MasterRandomGenerator.hpp.

Member Function Documentation

Binarizer& SUNphi::SerializableClass< MasterRandomGenerator >::binarize ( B &&  out = {}) const
inlineinherited

Convert to binary.

Parameters
outOutput

Definition at line 165 of file Map.hpp.

void SUNphi::SerializableClass< MasterRandomGenerator >::checkNoSpuriousSubNodes ( const YAML::Node &  node)
inlineinherited

Check that no spurious subnodes are contained.

Spurious list

Mark found or not

Expected name

Parameters
nodeNode to be checked

Definition at line 108 of file Map.hpp.

Binarizer& SUNphi::SerializableClass< MasterRandomGenerator >::deBinarize ( B &&  in)
inlineinherited

Convert from binary.

Parameters
inInput

Definition at line 180 of file Map.hpp.

bool SUNphi::SerializableClass< MasterRandomGenerator >::deSerialize ( const YAML::Node &  node)
inlineinherited

Convert from a YAML node.

Parameters
nodeNode from which to convert

Definition at line 146 of file Map.hpp.

bool SUNphi::SerializableClass< MasterRandomGenerator >::isDefault ( ) const
inlineinherited

Check if the class is default.

Default value

Definition at line 53 of file Map.hpp.

Cast operator to class T

Definition at line 50 of file Map.hpp.

const MasterRandomGenerator & SUNphi::SerializableClass< MasterRandomGenerator >::operator~ ( ) const
inlineinherited

Constant cast operator to class T

Definition at line 50 of file Map.hpp.

auto SUNphi::MasterRandomGenerator::serializableMembers ( ) const
inline

Gets the reference to the serializable members

Definition at line 42 of file MasterRandomGenerator.hpp.

auto SUNphi::MasterRandomGenerator::serializableMembers ( )
inline

Gets the reference to the serializable members

Definition at line 42 of file MasterRandomGenerator.hpp.

YAML::Node SUNphi::SerializableClass< MasterRandomGenerator >::serialize ( YAML::Node &  node,
const bool &  onlyNonDefault = false 
) const
inlineinherited

Convert to YAML node.

Parameters
nodeResulting node
onlyNonDefaultPrints only non-default

Definition at line 72 of file Map.hpp.

YAML::Node SUNphi::SerializableClass< MasterRandomGenerator >::serialize ( const bool &  onlyNonDefault = false) const
inlineinherited

Convert to YAML node.

Resulting node

Parameters
onlyNonDefaultPrints only non-default

Definition at line 87 of file Map.hpp.

Member Data Documentation

constexpr int SUNphi::MasterRandomGenerator::nSeeds
staticprivate
Initial value:
=
_MasterRandomGenerator::state_size

Number of seeds needed to initialize the state.

Definition at line 26 of file MasterRandomGenerator.hpp.

const std::vector<uint64_t>& SUNphi::MasterRandomGenerator::seeds
private
Initial value:

Constant access to the seeds.

Definition at line 33 of file MasterRandomGenerator.hpp.


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