UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
Edge Class Reference

This class represents an edge in a Hypergraph. More...

#include <Edge.h>

Collaboration diagram for Edge:
Collaboration graph
[legend]

Public Types

typedef vector< IDTypeVList
 Alias for the sequence of vertices to which this edge is attached.
 

Public Member Functions

 Edge (IDType id, vector< IDType > const &verts=vector< IDType >(), string label="")
 Creates a new Edge with the given ID, vertex sequence and label. More...
 
 ~Edge ()
 Destroys this instance of an Edge.
 
IDType getID () const
 Returns the ID of this Edge. More...
 
string getLabel () const
 Returns the label of this Edge. More...
 
void setLabel (string s)
 Sets the label of this Edge. More...
 
size_t getArity () const
 Returns the number of vertices attached to this Edge. More...
 
VListgetVertices ()
 Returns a reference to the sequence of vertices of this Edge. More...
 
VList const & getVertices () const
 Returns a reference to the sequence of vertices of this Edge. More...
 
VList::iterator beginV ()
 Returns an iterator pointing to the first element of the sequence of attached vertices. More...
 
VList::const_iterator beginV () const
 Returns an const_iterator pointing to the first element of the sequence of attached vertices. More...
 
VList::const_iterator cbeginV () const
 Returns an const_iterator pointing to the first element of the sequence of attached vertices. More...
 
VList::iterator endV ()
 Returns an iterator pointing beyond the last element of the sequence of attached vertices. More...
 
VList::const_iterator endV () const
 Returns an const_iterator pointing beyond the last element of the sequence of attached vertices. More...
 
VList::const_iterator cendV () const
 Returns an const_iterator pointing beyond the last element of the sequence of attached vertices. More...
 

Private Attributes

IDType ID
 Stores the ID of this Edge.
 
string label
 Stores the label of this Edge.
 
VList vertices
 Stores the sequence of vertices to which this edge is attached.
 

Friends

std::ostream & operator<< (std::ostream &ost, Edge const &data)
 Streams all data stores in the given Edge to the given stream. More...
 

Detailed Description

This class represents an edge in a Hypergraph.

It can be addressed by an ID, but must be stored within a Hypergraph, i.e. it cannot be a stand-alone object.

Author
Jan Stückrath

Constructor & Destructor Documentation

Edge ( IDType  id,
vector< IDType > const &  verts = vector<IDType>(),
string  label = "" 
)

Creates a new Edge with the given ID, vertex sequence and label.

Parameters
idthe ID of the Edge
vertsthe sequence of vertices to which this edge is attached.
labelthe label of the Edge

Member Function Documentation

Edge::VList::iterator beginV ( )

Returns an iterator pointing to the first element of the sequence of attached vertices.

Returns
an iterator pointing to the first element of the sequence of attached vertices
Edge::VList::const_iterator beginV ( ) const

Returns an const_iterator pointing to the first element of the sequence of attached vertices.

Returns
an const_iterator pointing to the first element of the sequence of attached vertices
Edge::VList::const_iterator cbeginV ( ) const

Returns an const_iterator pointing to the first element of the sequence of attached vertices.

Returns
an const_iterator pointing to the first element of the sequence of attached vertices
Edge::VList::const_iterator cendV ( ) const

Returns an const_iterator pointing beyond the last element of the sequence of attached vertices.

Returns
an const_iterator pointing beyond the last element of the sequence of attached vertices
Edge::VList::iterator endV ( )

Returns an iterator pointing beyond the last element of the sequence of attached vertices.

Returns
an iterator pointing beyond the last element of the sequence of attached vertices
Edge::VList::const_iterator endV ( ) const

Returns an const_iterator pointing beyond the last element of the sequence of attached vertices.

Returns
an const_iterator pointing beyond the last element of the sequence of attached vertices
size_t getArity ( ) const

Returns the number of vertices attached to this Edge.

A vertex is counted as often as it is attached to the edge.

Returns
the number of vertices attached
IDType getID ( ) const

Returns the ID of this Edge.

Returns
the ID of this Edge
string getLabel ( ) const

Returns the label of this Edge.

Returns
the label of this Edge
Edge::VList & getVertices ( )

Returns a reference to the sequence of vertices of this Edge.

Returns
a reference to the sequence of vertices of this Edge.
Edge::VList const & getVertices ( ) const

Returns a reference to the sequence of vertices of this Edge.

Returns
a reference to the sequence of vertices of this Edge.
void setLabel ( string  s)

Sets the label of this Edge.

Parameters
sthe new label

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ost,
Edge const &  data 
)
friend

Streams all data stores in the given Edge to the given stream.

Parameters
ostthe ostream to be used
datathe Edge to be streamed
Returns
a reference to the given stream

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