List of all members | Public Member Functions
filtered_gate Class Reference

Wrapper for a gate to filter some lines. More...

Inheritance diagram for filtered_gate:
gate

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_gateoperator= (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...
 
gateoperator= (const gate &other)
 Assignment operator. More...
 

Additional Inherited Members

- Public Types inherited from gate
typedef std::vector< gatevector
 Vector type of gates. More...
 
typedef unsigned line
 Type for accessing the line (line index) More...
 
typedef std::set< lineline_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...
 

Detailed Description

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.

Author
RevKit
Since
1.0

Constructor & Destructor Documentation

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.

Parameters
baseThe underlying referenced gate
filterA vector with line indices which are included in this gate
Author
RevKit
Since
1.0
filtered_gate ( const filtered_gate other)
explicit

Copy constructor.

Parameters
otherObject to be copied from
Author
RevKit
Since
1.0

Member Function Documentation

void add_control ( line  c)
virtual

Adds a control line to the gate.

Parameters
ccontrol line to add
Author
RevKit
Since
1.0

Reimplemented from gate.

void add_target ( line  l)
virtual

Adds a target to the desired line.

Parameters
ltarget line
Author
RevKit
Since
1.0

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.

Author
RevKit
Since
1.0

Reimplemented from gate.

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

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).

Author
RevKit
Since
1.0

Reimplemented from gate.

filtered_gate& operator= ( const filtered_gate other)

Assignment operator.

Parameters
otherGate to be assigned
Returns
Pointer to instance
Author
RevKit
Since
1.0
void remove_control ( line  c)
virtual

Remove control line to the gate.

Parameters
ccontrol line to remove
Author
RevKit
Since
1.0

Reimplemented from gate.

void remove_target ( line  l)
virtual

Removes a target from the desired line.

Parameters
ltarget line
Author
RevKit
Since
1.0

Reimplemented from gate.

void set_type ( const boost::any &  t)
virtual

Sets the type of the target line(s)

Parameters
ttarget type
Author
RevKit
Since
1.0

Reimplemented from gate.

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.

Author
RevKit
Since
1.0
Returns
Number of control and target lines.

Reimplemented from gate.

const boost::any& type ( ) const
virtual

Returns the type of the target line(s)

Returns
target type
Author
RevKit
Since
1.0

Reimplemented from gate.


The documentation for this class was generated from the following file:

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1