CG_Gen::CoderGenerator class

Base classes

class SimpleGenerator

Constructors, destructors, conversion operators

CoderGenerator()
CoderGenerator(uint_fast32_t i_seed)
CoderGenerator(const GenerationParameters& i_param)

Public functions

auto generatorEncoder(uint32_t i_bits) -> GraphPtr
generatorEncoder represents the generation of a combinational scheme of a standard binary encoder.
auto generatorDecoder(uint32_t i_bits) -> GraphPtr
generatorDecoder represents the generation of a combinational decoder circuit.
auto generatorEncoder(const GenerationParameters& i_param) -> GraphPtr
auto generatorDecoder(const GenerationParameters& i_param) -> GraphPtr
auto generatorEncoder() -> GraphPtr
auto generatorDecoder() -> GraphPtr

Function documentation

GraphPtr CG_Gen::CoderGenerator::generatorEncoder(uint32_t i_bits)

generatorEncoder represents the generation of a combinational scheme of a standard binary encoder.

Parameters
i_bits The number of bits, or in other words, input vertices (variables) in the graph.
Returns the created OrientedGraph

The number of incoming bits (n) must be equal to two in degree (m), whose value is the number of outputs in the graph. If the number n is not equal to two in any degree, then the power of two is selected, at which the value will be the nearest and greater than the value of n itself. If one bit is applied to the input, the generation is canceled.

GraphPtr CG_Gen::CoderGenerator::generatorDecoder(uint32_t i_bits)

generatorDecoder represents the generation of a combinational decoder circuit.

Parameters
i_bits The number of bits, or in other words, input vertices (variables) in the graph.
Returns the created OrientedGraph

The logic of generation is close to the logic of generating an encoder, except for logical operations and the fact that the number of input vertices is a power of two of the number of output vertices. The number of input vertices can range from 1 to the desired number by the user.