CG_Gen::SimpleGenerator class

Derived classes

class ALUGenerator
class ArithmeticGenerator
class CascadeGenerator
class CoderGenerator
class ComparisonGenerator
class DotGenerator
class FromTruthTableGenerator
class MealyMooreGenerator
class NumOperationsGenerator
class ParityGenerator
class PlexerGenerator
class RandLevelGenerator

Constructors, destructors, conversion operators

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

Public functions

void setGatesInputsInfo(const std::map<std::string, std::vector<int32_t>>& i_info)
setGatesInputsInfo It is designed to set information about the inputs for various logic gates.
auto getGatesInputsInfo() const -> GatesInfo

Protected functions

auto getParameters() const -> const GenerationParameters&
auto delNull(std::map<Gates, int32_t> i_copyLogicOper) -> std::map<Gates, int32_t>
auto getRandomElement(const GatesInfo& i_info) -> std::pair<Gates, int32_t>
auto getRandomElement(uint32_t i_gatesLimit) -> std::pair<Gates, int32_t>

Protected variables

std::shared_ptr<Settings> d_settings
GatesInfo d_gatesInputsInfo
RandomGeneratorWithSeed d_randGenerator
int32_t d_maxGateNumber
int32_t d_minGateNumber

Function documentation

void CG_Gen::SimpleGenerator::setGatesInputsInfo(const std::map<std::string, std::vector<int32_t>>& i_info)

setGatesInputsInfo It is designed to set information about the inputs for various logic gates.

Parameters
i_info A map containing information about the entrances to various gates. The map keys are the names of the gates, and the values are vectors of integers representing the entry ports for each gate.

It takes as an argument a dictionary, where the keys are the names of logical gates (Gates), and the values are vectors of integers representing the entry ports for each gate.