tudocomp
– The TU Dortmund Compression Framework
|
Generates a random string of uniformly distributed characters. More...
#include <RandomUniformGenerator.hpp>
Public Member Functions | |
virtual std::string | generate () override |
Generates a string based on the environment settings. More... | |
Public Member Functions inherited from tdc::Algorithm | |
virtual | ~Algorithm ()=default |
Algorithm (Algorithm const &)=default | |
Algorithm (Algorithm &&)=default | |
Algorithm & | operator= (Algorithm const &)=default |
Algorithm & | operator= (Algorithm &&)=default |
Algorithm (Env &&env) | |
Instantiates an algorithm in the specified environment. More... | |
Env & | env () |
Provides access to the environment that the algorithm works in. More... | |
const Env & | env () const |
Static Public Member Functions | |
static Meta | meta () |
static std::string | generate (size_t length, size_t seed=0, size_t min='0', size_t max='9') |
Generates a random string of uniformly distributed characters.
The range of generated character ASCII codes can be specified using the min
and max
environment parameters, as well as the seed value for the randomizer.
A seed of zero (default) will result in a seed obtained from the system clock.
Definition at line 17 of file RandomUniformGenerator.hpp.
|
inlinestatic |
Definition at line 29 of file RandomUniformGenerator.hpp.
|
inlineoverridevirtual |
Generates a string based on the environment settings.
Implements tdc::Generator.
Definition at line 48 of file RandomUniformGenerator.hpp.
|
inlinestatic |
Definition at line 20 of file RandomUniformGenerator.hpp.