Wrapper for a gate to filter some lines. More...
Public Member Functions | |
filtered_gate (gate &base, std::vector< unsigned > &filter) | |
Standard constructor. | |
filtered_gate (const filtered_gate &other) | |
Copy constructor. | |
virtual | ~filtered_gate () |
Deconstructor. | |
filtered_gate & | operator= (const filtered_gate &other) |
Assignment operator. | |
const_iterator | begin_controls () const |
Start iterator for accessing control lines. | |
const_iterator | end_controls () const |
End iterator for accessing control lines (const). | |
iterator | begin_controls () |
Start iterator for accessing control lines (non-const). | |
iterator | end_controls () |
End iterator for accessing control lines (non-const). | |
const_iterator | begin_targets () const |
Start iterator for accessing target lines (const). | |
const_iterator | end_targets () const |
End iterator for accessing target lines (const). | |
iterator | begin_targets () |
Start iterator for accessing target lines (const). | |
iterator | end_targets () |
End iterator for accessing target lines (non-const). | |
unsigned | size () const |
Returns the number of control and target lines as sum. | |
void | add_control (line c) |
Adds a control line to the gate. | |
void | remove_control (line c) |
Remove control line to the gate. | |
void | add_target (line l) |
Adds a target to the desired line. | |
void | remove_target (line l) |
Removes a target from the desired line. | |
void | set_type (const boost::any &t) |
Sets the type of the target line(s). | |
const boost::any & | type () const |
Returns the type of the target line(s). |
Wrapper for a gate to filter some lines.
This class wraps a underline base
gate to just access some lines which are specified in filter.
You will never have to create a filtered_gate object on your own, but you will get this as reference object to your iterators in a subcircuit.
filtered_gate | ( | gate & | base, | |
std::vector< unsigned > & | filter | |||
) |
Standard constructor.
Creates a filtered_gate from a base gate and a list of indices which should be included in this gate.
base | The underlying referenced gate | |
filter | A vector with line indices which are included in this gate |
filtered_gate | ( | const filtered_gate & | other | ) | [explicit] |
Copy constructor.
other | Object to be copied from |
void add_control | ( | line | c | ) | [virtual] |
Adds a control line to the gate.
c | control line to add |
Reimplemented from gate.
void add_target | ( | line | l | ) | [virtual] |
iterator begin_controls | ( | ) | [virtual] |
Start iterator for accessing control lines (non-const).
Returns The start iterator of the line_container for accessing lines (non-const).
Reimplemented from gate.
const_iterator begin_controls | ( | ) | const [virtual] |
Start iterator for accessing control lines.
Returns The start iterator of the line_container for accessing control lines.
Reimplemented from gate.
iterator begin_targets | ( | ) | [virtual] |
Start iterator for accessing target lines (const).
Returns The start iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
const_iterator begin_targets | ( | ) | const [virtual] |
Start iterator for accessing target lines (const).
Returns The start iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
iterator end_controls | ( | ) | [virtual] |
End iterator for accessing control lines (non-const).
Returns the end iterator of the line_container for accessing control lines (non-const).
Reimplemented from gate.
const_iterator end_controls | ( | ) | const [virtual] |
End iterator for accessing control lines (const).
Returns The end iterator of the line_container for accessing control lines (const).
Reimplemented from gate.
iterator end_targets | ( | ) | [virtual] |
End iterator for accessing target lines (non-const).
Returns The start iterator of the line_container for accessing target lines (non-const).
Reimplemented from gate.
const_iterator end_targets | ( | ) | const [virtual] |
End iterator for accessing target lines (const).
Returns The end iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
filtered_gate& operator= | ( | const filtered_gate & | other | ) |
Assignment operator.
other | Gate to be assigned |
void remove_control | ( | line | c | ) | [virtual] |
Remove control line to the gate.
c | control line to remove |
Reimplemented from gate.
void remove_target | ( | line | l | ) | [virtual] |
Removes a target from the desired line.
l | target line |
Reimplemented from gate.
void set_type | ( | const boost::any & | t | ) | [virtual] |
unsigned size | ( | ) | const [virtual] |
Returns the number of control and target lines as sum.
This method returns the number of control and target lines as sum and can be used for e.g. calculating costs.
Reimplemented from gate.
const boost::any& type | ( | ) | const [virtual] |