Settings for print_circuit function. More...
Public Member Functions | |
print_circuit_settings (std::ostream &os=std::cout) | |
Default constructor. More... | |
virtual | ~print_circuit_settings () |
Default deconstructor. More... | |
virtual char | target_type_char (const gate &g) const |
Returns a char for a gate. More... | |
Public Attributes | |
std::ostream & | os |
The stream to dump the circuit to (default: std::ostream) More... | |
bool | print_inputs_and_outputs |
Determines whether the inputs and outputs should be printed (default: false) More... | |
bool | print_gate_index |
Determines whether the gate_index should be printed (default: false) More... | |
char | control_char |
Character to be printed for a control line. More... | |
char | line_char |
Character to be printed for an empty line. More... | |
unsigned | gate_spacing |
Space between gates. More... | |
unsigned | line_spacing |
Space between lines. More... | |
Settings for print_circuit function.
print_circuit_settings | ( | std::ostream & | os = std::cout | ) |
Default constructor.
Initializes default values
os | The stream parameter has to be determined in the constructor |
|
virtual |
Default deconstructor.
|
virtual |
Returns a char for a gate.
The default implementation returns O for Toffoli and Peres gates, X for Fredkin, v for V gates, and + for V+ gates.
For unknown gates an empty char ' ' is returned.
When overriding this method, first the base method can be called and further decisions can be made when the return value is an empty char meaning it is an unknown type.
g | Gate |
char control_char |
Character to be printed for a control line.
Default value is *
unsigned gate_spacing |
Space between gates.
Default value is 0.
char line_char |
Character to be printed for an empty line.
Default value is -
unsigned line_spacing |
Space between lines.
Default value is 0.
std::ostream& os |
The stream to dump the circuit to (default: std::ostream)
bool print_gate_index |
Determines whether the gate_index should be printed (default: false)
If this flag is enabled, in the first line – before the circuit is printed – the gate index is printed as modulo to base 10, because there is only space for one character.
bool print_inputs_and_outputs |
Determines whether the inputs and outputs should be printed (default: false)