tudocomp
– The TU Dortmund Compression Framework
tdc::ThueMorseGenerator Class Reference

Generates the n-th Thue Morse word. More...

#include <ThueMorseGenerator.hpp>

Inheritance diagram for tdc::ThueMorseGenerator:
tdc::Generator tdc::Algorithm

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 n)
 

Detailed Description

Generates the n-th Thue Morse word.

Note that the n-th Thue Morse word is 2^n characters long.

Definition at line 10 of file ThueMorseGenerator.hpp.

Member Function Documentation

◆ generate() [1/2]

static std::string tdc::ThueMorseGenerator::generate ( size_t  n)
inlinestatic

Definition at line 19 of file ThueMorseGenerator.hpp.

◆ generate() [2/2]

virtual std::string tdc::ThueMorseGenerator::generate ( )
inlineoverridevirtual

Generates a string based on the environment settings.

Returns
the generated string.

Implements tdc::Generator.

Definition at line 39 of file ThueMorseGenerator.hpp.

◆ meta()

static Meta tdc::ThueMorseGenerator::meta ( )
inlinestatic

Definition at line 13 of file ThueMorseGenerator.hpp.


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