Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ase::KeccakFastRng Class Reference

#include "randomhash.hh"

Inheritance diagram for Ase::KeccakFastRng:
[legend]

Public Member Functions

 KeccakFastRng ()
 Initialize and seed the generator from a system specific nondeterministic random source.
 
template<class SeedSeq >
 KeccakFastRng (SeedSeq &seed_sequence)
 Initialize and seed the generator from seed_sequence.
 
- Public Member Functions inherited from Ase::KeccakRng
 KeccakRng (const KeccakRng &)=default
 
size_t n_nums () const
 Amount of 64 bit random numbers per generated block.
 
size_t bit_capacity () const
 Amount of bits used to store hidden random number generator state.
 
 ~KeccakRng ()
 The destructor resets the generator state to avoid leaving memory trails.
 
 KeccakRng (uint16_t hidden_state_capacity, uint16_t n_rounds)
 Create an unseeded Keccak PRNG with specific capacity and number of rounds, for experts only.
 
void forget ()
 
void discard (unsigned long long count)
 
void xor_seed (const uint64_t *seeds, size_t n_seeds)
 
void seed (uint64_t seed_value=1)
 Reinitialize the generator state using a 64 bit seed_value.
 
void seed (const uint64_t *seeds, size_t n_seeds)
 Reinitialize the generator state using a nuber of 64 bit seeds.
 
template<class SeedSeq >
void seed (SeedSeq &seed_sequence)
 Seed the generator state from a seed_sequence.
 
void auto_seed ()
 Seed the generator from a system specific nondeterministic random source.
 
uint64_t random ()
 
result_type operator() ()
 Generate uniformly distributed 32 bit pseudo random number.
 
template<typename RandomAccessIterator >
void generate (RandomAccessIterator begin, RandomAccessIterator end)
 Fill the range [begin, end) with random unsigned integer values.
 
result_type min () const
 Minimum of the result type, for uint64_t that is 0.
 
result_type max () const
 Maximum of the result type, for uint64_t that is 18446744073709551615.
 

Additional Inherited Members

- Public Types inherited from Ase::KeccakRng
typedef uint64_t result_type
 Integral type of the KeccakRng generator results.
 

Detailed Description

KeccakFastRng - A KeccakF1600 based fast pseudo-random number generator. This class tunes the KeccakF1600 algorithm for best performance in pseudo random number generation. Performance is improved while still retaining quality random number generation, according to the findings in seciton "4.1.1 Statistical tests" from http://keccak.noekeon.org/Keccak-reference-3.0.pdf.

Definition at line 400 of file randomhash.hh.

Constructor & Destructor Documentation

◆ KeccakFastRng() [1/2]

Ase::KeccakFastRng::KeccakFastRng ( )
explicit

Initialize and seed the generator from a system specific nondeterministic random source.

Definition at line 403 of file randomhash.hh.

References Ase::KeccakRng::auto_seed().

◆ KeccakFastRng() [2/2]

template<class SeedSeq >
Ase::KeccakFastRng::KeccakFastRng ( SeedSeq &  seed_sequence)
explicit

Initialize and seed the generator from seed_sequence.

Definition at line 406 of file randomhash.hh.

References Ase::KeccakRng::seed().


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