BALL::GraphFace< Vertex, Edge, Face > Class Template Reference

#include <BALL/STRUCTURE/graphFace.h>

List of all members.

Public Types

Type definitions
typedef std::list< Vertex * >
::iterator 
VertexIterator
typedef std::list< Vertex * >
::const_iterator 
ConstVertexIterator
typedef std::list< Edge * >
::iterator 
EdgeIterator
typedef std::list< Edge * >
::const_iterator 
ConstEdgeIterator

Public Member Functions

Constructors and Destructors
 GraphFace ()
 GraphFace (const GraphFace< Vertex, Edge, Face > &face, bool deep=false)
virtual ~GraphFace ()
Assignments
void set (const GraphFace< Vertex, Edge, Face > &face, bool deep=false)
GraphFace< Vertex, Edge, Face > & operator= (const GraphFace< Vertex, Edge, Face > &face)
Accessors
void insert (Vertex *vertex)
void insert (Edge *edge)
void remove (Vertex *vertex)
void remove (Edge *edge)
Position numberOfVertices () const
Position numberOfEdges () const
void setIndex (Index index)
Index getIndex () const
bool getEdges (const Vertex *vertex, Edge *&edge1, Edge *&edge2) const
bool getEdge (const Vertex *vertex1, const Vertex *vertex2, Edge *&edge) const
Edge * getSimilarEdge (const Edge *edge) const
bool substitute (const Vertex *old_vertex, Vertex *new_vertex)
bool substitute (const Edge *old_edge, Edge *new_edge)
Predicates
virtual bool operator== (const Face &face) const
virtual bool operator!= (const Face &face) const
virtual bool operator*= (const Face &face) const
Vertexhas (Vertex *vertex) const
Edge * has (Edge *edge) const

Friends

Class friends
  • class GraphVertex<Vertex,Edge,Face>;
  • class GraphEdge<Vertex,Edge,Face>;
class GraphVertex< Vertex, Edge, Face >
class GraphEdge< Vertex, Edge, Face >

External Iterators

std::list< Vertex * > vertex_
std::list< Edge * > edge_
Index index_
VertexIterator beginVertex ()
ConstVertexIterator beginVertex () const
VertexIterator endVertex ()
ConstVertexIterator endVertex () const
EdgeIterator beginEdge ()
ConstEdgeIterator beginEdge () const
EdgeIterator endEdge ()
ConstEdgeIterator endEdge () const

Detailed Description

template<typename Vertex, typename Edge, typename Face>
class BALL::GraphFace< Vertex, Edge, Face >

Generic GraphFace Class.


Member Typedef Documentation

template<typename Vertex, typename Edge, typename Face>
typedef std::list<Edge*>::const_iterator BALL::GraphFace< Vertex, Edge, Face >::ConstEdgeIterator
template<typename Vertex, typename Edge, typename Face>
typedef std::list<Vertex*>::const_iterator BALL::GraphFace< Vertex, Edge, Face >::ConstVertexIterator
template<typename Vertex, typename Edge, typename Face>
typedef std::list<Edge*>::iterator BALL::GraphFace< Vertex, Edge, Face >::EdgeIterator
template<typename Vertex, typename Edge, typename Face>
typedef std::list<Vertex*>::iterator BALL::GraphFace< Vertex, Edge, Face >::VertexIterator

Constructor & Destructor Documentation

template<typename Vertex , typename Edge , typename Face >
BALL::GraphFace< Vertex, Edge, Face >::GraphFace ( )

Default constructor. This method creates a new GraphFace object.

template<typename Vertex, typename Edge, typename Face>
BALL::GraphFace< Vertex, Edge, Face >::GraphFace ( const GraphFace< Vertex, Edge, Face > &  face,
bool  deep = false 
)

Copy constructor. Create a new GraphFace object from another.

Parameters:
facethe GraphFace object to be copied
deepif deep = false, all pointers are set to NULL (default). Otherwise the new GraphFace object is linked to the neighbours of the old GraphFace object.

References BALL::GraphFace< Vertex, Edge, Face >::edge_, and BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex , typename Edge , typename Face >
BALL::GraphFace< Vertex, Edge, Face >::~GraphFace ( ) [virtual]

Destructor. Destructs the GraphFace object.


Member Function Documentation

template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::EdgeIterator BALL::GraphFace< Vertex, Edge, Face >::beginEdge ( )
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphFace< Vertex, Edge, Face >::beginEdge ( ) const
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::ConstVertexIterator BALL::GraphFace< Vertex, Edge, Face >::beginVertex ( ) const
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::VertexIterator BALL::GraphFace< Vertex, Edge, Face >::beginVertex ( )
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::EdgeIterator BALL::GraphFace< Vertex, Edge, Face >::endEdge ( )
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphFace< Vertex, Edge, Face >::endEdge ( ) const
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::VertexIterator BALL::GraphFace< Vertex, Edge, Face >::endVertex ( )
template<typename Vertex , typename Edge , typename Face >
GraphFace< Vertex, Edge, Face >::ConstVertexIterator BALL::GraphFace< Vertex, Edge, Face >::endVertex ( ) const
template<typename Vertex, typename Edge, typename Face >
bool BALL::GraphFace< Vertex, Edge, Face >::getEdge ( const Vertex vertex1,
const Vertex vertex2,
Edge *&  edge 
) const

Find the edge of the GraphFace that belongs to the two given vertices

Parameters:
vertex1a pointer to the first given vertex
vertex2a pointer to the second given vertex
edgea pointer to the found edge
Returns:
bool true if the edge can be found, false otherwise

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex, typename Edge, typename Face >
bool BALL::GraphFace< Vertex, Edge, Face >::getEdges ( const Vertex vertex,
Edge *&  edge1,
Edge *&  edge2 
) const

Find the two edges of the GraphFace that belong to the given vertex

Parameters:
vertexa pointer to the given vertex
edge1a pointer to the first found edge
edge2a pointer to the second found edge
Returns:
bool true if the edges can be found, false otherwise

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex , typename Edge , typename Face >
Index BALL::GraphFace< Vertex, Edge, Face >::getIndex ( ) const

Return the index of the GraphFace.

Returns:
Index the index of the GraphFace

References BALL::GraphFace< Vertex, Edge, Face >::index_.

template<typename Vertex , typename Edge, typename Face >
Edge * BALL::GraphFace< Vertex, Edge, Face >::getSimilarEdge ( const Edge *  edge) const

Find the edge of the GraphFace that is similar to the given edge.

Parameters:
edgea pointer to the given edge
Returns:
Edge* a pointer to the similar edge of te GraphFace if it can be found, otherwise NULL

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex, typename Edge , typename Face >
Vertex * BALL::GraphFace< Vertex, Edge, Face >::has ( Vertex vertex) const

Test whether a vertex is meber of the face.

Parameters:
vertexa pointer to the the vertex to test
Returns:
Vertex* a pointer to the vertex if it exists, otherwise NULL

References BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex, typename Edge, typename Face >
Edge * BALL::GraphFace< Vertex, Edge, Face >::has ( Edge *  edge) const

Test whether an edge is meber of the face.

Parameters:
edgea pointer to the edge to test
Returns:
Edge* a pointer to the edge if it exists, otherwise NULL

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex, typename Edge , typename Face >
void BALL::GraphFace< Vertex, Edge, Face >::insert ( Vertex vertex)

Insert a new vertex to the GraphFace.

Parameters:
vertexa pointer to the new vertex

References BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex, typename Edge, typename Face >
void BALL::GraphFace< Vertex, Edge, Face >::insert ( Edge *  edge)

Insert a new edge to the GraphFace.

Parameters:
edgea pointer to the new edge

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex , typename Edge , typename Face >
Position BALL::GraphFace< Vertex, Edge, Face >::numberOfEdges ( ) const

Return the number of edges of the GraphFace.

Returns:
Position the number of edges of the GraphFace

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex , typename Edge , typename Face >
Position BALL::GraphFace< Vertex, Edge, Face >::numberOfVertices ( ) const

Return the number of vertices of the GraphFace.

Returns:
Position the number of vertices of the GraphFace

References BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex , typename Edge , typename Face>
bool BALL::GraphFace< Vertex, Edge, Face >::operator!= ( const Face &  face) const [virtual]

Inequality operator.

Returns:
bool false

Reimplemented in BALL::SASFace, and BALL::SESFace.

template<typename Vertex , typename Edge , typename Face>
bool BALL::GraphFace< Vertex, Edge, Face >::operator*= ( const Face &  face) const [virtual]

Similarity operator.

Returns:
bool true

Reimplemented in BALL::SASFace, and BALL::SESFace.

template<typename Vertex, typename Edge, typename Face>
GraphFace< Vertex, Edge, Face > & BALL::GraphFace< Vertex, Edge, Face >::operator= ( const GraphFace< Vertex, Edge, Face > &  face)

Assign from another GraphFace. The GraphFace object is linked to the neighbours of the GraphFace object to assign from.

Parameters:
facethe GraphFace object to assign from

References BALL::GraphFace< Vertex, Edge, Face >::edge_, BALL::GraphFace< Vertex, Edge, Face >::index_, and BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex , typename Edge , typename Face>
bool BALL::GraphFace< Vertex, Edge, Face >::operator== ( const Face &  face) const [virtual]

Equality operator.

Returns:
bool true

Reimplemented in BALL::SASFace, and BALL::SESFace.

template<typename Vertex, typename Edge , typename Face >
void BALL::GraphFace< Vertex, Edge, Face >::remove ( Vertex vertex)

Remove a vertex from the GraphFace.

Parameters:
vertexa pointer to the vertex to remove

References BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex, typename Edge, typename Face >
void BALL::GraphFace< Vertex, Edge, Face >::remove ( Edge *  edge)

Remove an edge from the GraphFace.

Parameters:
edgea pointer to the edge to remove

References BALL::GraphFace< Vertex, Edge, Face >::edge_.

template<typename Vertex, typename Edge, typename Face>
void BALL::GraphFace< Vertex, Edge, Face >::set ( const GraphFace< Vertex, Edge, Face > &  face,
bool  deep = false 
)

Assign from another GraphFace.

Parameters:
facethe GraphFacee object to assign from
deepif deep = false, all pointers are set to NULL (default). Otherwise the GraphFace object is linked to the neighbours of the GraphFace object to assign from.

References BALL::GraphFace< Vertex, Edge, Face >::edge_, BALL::GraphFace< Vertex, Edge, Face >::index_, and BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex , typename Edge , typename Face >
void BALL::GraphFace< Vertex, Edge, Face >::setIndex ( Index  index)

Set the index of the GraphFace.

Parameters:
indexthe new index

References BALL::GraphFace< Vertex, Edge, Face >::index_.

template<typename Vertex, typename Edge , typename Face >
bool BALL::GraphFace< Vertex, Edge, Face >::substitute ( const Vertex old_vertex,
Vertex new_vertex 
)

Substitute a vertex by an other one.

Parameters:
old_vertexthe vertex that has to be substituted
new_vertexthe new vertex
Returns:
bool true, if the vertex can be substituted, false otherwise

References BALL::GraphFace< Vertex, Edge, Face >::vertex_.

template<typename Vertex, typename Edge, typename Face >
bool BALL::GraphFace< Vertex, Edge, Face >::substitute ( const Edge *  old_edge,
Edge *  new_edge 
)

Substitute an edge by an other one.

Parameters:
old_edgethe edge that has to be substituted
new_edgethe new edge
Returns:
bool true, if the edge can be substituted, false otherwise

References BALL::GraphFace< Vertex, Edge, Face >::edge_.


Friends And Related Function Documentation

template<typename Vertex, typename Edge, typename Face>
friend class GraphEdge< Vertex, Edge, Face > [friend]
template<typename Vertex, typename Edge, typename Face>
friend class GraphVertex< Vertex, Edge, Face > [friend]

Member Data Documentation