Wrapper for a gate to filter some lines. More...
Public Member Functions | |
filtered_gate (gate &base, std::vector< unsigned > &filter) | |
Standard constructor. More... | |
filtered_gate (const filtered_gate &other) | |
Copy constructor. More... | |
virtual | ~filtered_gate () |
Deconstructor. | |
filtered_gate & | operator= (const filtered_gate &other) |
Assignment operator. More... | |
const_iterator | begin_controls () const |
Start iterator for accessing control lines. More... | |
const_iterator | end_controls () const |
End iterator for accessing control lines (const). More... | |
iterator | begin_controls () |
Start iterator for accessing control lines (non-const). More... | |
iterator | end_controls () |
End iterator for accessing control lines (non-const). More... | |
const_iterator | begin_targets () const |
Start iterator for accessing target lines (const). More... | |
const_iterator | end_targets () const |
End iterator for accessing target lines (const). More... | |
iterator | begin_targets () |
Start iterator for accessing target lines (const). More... | |
iterator | end_targets () |
End iterator for accessing target lines (non-const). More... | |
unsigned | size () const |
Returns the number of control and target lines as sum. More... | |
void | add_control (line c) |
Adds a control line to the gate. More... | |
void | remove_control (line c) |
Remove control line to the gate. More... | |
void | add_target (line l) |
Adds a target to the desired line. More... | |
void | remove_target (line l) |
Removes a target from the desired line. More... | |
void | set_type (const boost::any &t) |
Sets the type of the target line(s) More... | |
const boost::any & | type () const |
Returns the type of the target line(s) More... | |
Public Member Functions inherited from gate | |
gate () | |
Default constructor. More... | |
gate (const gate &other) | |
Copy Constructor. More... | |
virtual | ~gate () |
Default deconstructor. More... | |
gate & | operator= (const gate &other) |
Assignment operator. More... | |
Additional Inherited Members | |
Public Types inherited from gate | |
typedef std::vector< gate > | vector |
Vector type of gates. More... | |
typedef unsigned | line |
Type for accessing the line (line index) More... | |
typedef std::set< line > | line_container |
Container for storing lines. More... | |
typedef boost::transform_iterator < transform_line, boost::filter_iterator < filter_line, line_container::iterator > > | iterator |
Mutable Iterator for iterating through control or target lines. More... | |
typedef boost::transform_iterator < transform_line, boost::filter_iterator < filter_line, line_container::const_iterator > > | const_iterator |
Constant Iterator for iterating through control or target lines. More... | |
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 |
|
explicit |
Copy constructor.
other | Object to be copied from |
|
virtual |
|
virtual |
|
virtual |
Start iterator for accessing control lines.
Returns The start iterator of the line_container for accessing control lines.
Reimplemented from gate.
|
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.
|
virtual |
Start iterator for accessing target lines (const).
Returns The start iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
|
virtual |
Start iterator for accessing target lines (const).
Returns The start iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
|
virtual |
End iterator for accessing control lines (const).
Returns The end iterator of the line_container for accessing control lines (const).
Reimplemented from gate.
|
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.
|
virtual |
End iterator for accessing target lines (const).
Returns The end iterator of the line_container for accessing target lines (const).
Reimplemented from gate.
|
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.
filtered_gate& operator= | ( | const filtered_gate & | other | ) |
Assignment operator.
other | Gate to be assigned |
|
virtual |
Remove control line to the gate.
c | control line to remove |
Reimplemented from gate.
|
virtual |
|
virtual |
|
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.
|
virtual |