Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

GraphFace< Vertex, Edge, Face > Class Template Reference
[Molecular Surface Computation]

Generic GraphFace Class. More...

#include <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 () throw ()
 Default constructor.
 GraphFace (const GraphFace< Vertex, Edge, Face > &face, bool deep=false) throw ()
 Copy constructor.
virtual ~GraphFace () throw ()
 Destructor.
Assignments
void set (const GraphFace< Vertex, Edge, Face > &face, bool deep=false) throw ()
 Assign from another GraphFace.
GraphFace< Vertex, Edge, Face > & operator= (const GraphFace< Vertex, Edge, Face > &face) throw ()
 Assign from another GraphFace.
Accessors
void insert (Vertex *vertex) throw ()
 Insert a new vertex to the GraphFace.
void insert (Edge *edge) throw ()
 Insert a new edge to the GraphFace.
void remove (Vertex *vertex) throw ()
 Remove a vertex from the GraphFace.
void remove (Edge *edge) throw ()
 Remove an edge from the GraphFace.
Position numberOfVertices () const throw ()
 Return the number of vertices of the GraphFace.
Position numberOfEdges () const throw ()
 Return the number of edges of the GraphFace.
void setIndex (Index index) throw ()
 Set the index of the GraphFace.
Index getIndex () const throw ()
 Return the index of the GraphFace.
bool getEdges (const Vertex *vertex, Edge *&edge1, Edge *&edge2) const throw ()
 Find the two edges of the GraphFace that belong to the given vertex.
bool getEdge (const Vertex *vertex1, const Vertex *vertex2, Edge *&edge) const throw ()
 Find the edge of the GraphFace that belongs to the two given vertices.
Edge * getSimilarEdge (const Edge *edge) const throw ()
 Find the edge of the GraphFace that is similar to the given edge.
bool substitute (const Vertex *old_vertex, Vertex *new_vertex) throw ()
 Substitute a vertex by an other one.
bool substitute (const Edge *old_edge, Edge *new_edge) throw ()
 Substitute an edge by an other one.
Predicates
virtual bool operator== (const Face &face) const throw ()
 Equality operator.
virtual bool operator!= (const Face &face) const throw ()
 Inequality operator.
virtual bool operator *= (const Face &face) const throw ()
 Similarity operator.
Vertexhas (Vertex *vertex) const throw ()
 Test whether a vertex is meber of the face.
Edge * has (Edge *edge) const throw ()
 Test whether an edge is meber of the face.
External Iterators
VertexIterator beginVertex () throw ()
ConstVertexIterator beginVertex () const throw ()
VertexIterator endVertex () throw ()
ConstVertexIterator endVertex () const throw ()
EdgeIterator beginEdge () throw ()
ConstEdgeIterator beginEdge () const throw ()
EdgeIterator endEdge () throw ()
ConstEdgeIterator endEdge () const throw ()

Protected Attributes

std::list< Vertex * > vertex_
std::list< Edge * > edge_
Index index_

Friends

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


class GraphVertex<Vertex,Edge,Face>
class GraphEdge<Vertex,Edge,Face>


Detailed Description

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

Generic GraphFace Class.


Constructor & Destructor Documentation

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

Default constructor.

This method creates a new GraphFace object.

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

Copy constructor.

Create a new GraphFace object from another.

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

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

Destructor.

Destructs the GraphFace object.


Member Function Documentation

template<typename Vertex, typename Edge, typename Face>
bool GraphFace< Vertex, Edge, Face >::getEdge const Vertex vertex1,
const Vertex vertex2,
Edge *&  edge
const throw ()
 

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

Parameters:
vertex1 a pointer to the first given vertex
vertex2 a pointer to the second given vertex
edge a pointer to the found edge
Returns:
bool true if the edge can be found, false otherwise

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

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

Parameters:
vertex a pointer to the given vertex
edge1 a pointer to the first found edge
edge2 a pointer to the second found edge
Returns:
bool true if the edges can be found, false otherwise

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

Return the index of the GraphFace.

Returns:
Index the index of the GraphFace

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

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

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

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

Test whether an edge is meber of the face.

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

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

Test whether a vertex is meber of the face.

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

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

Insert a new edge to the GraphFace.

Parameters:
edge a pointer to the new edge

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

Insert a new vertex to the GraphFace.

Parameters:
vertex a pointer to the new vertex

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

Return the number of edges of the GraphFace.

Returns:
Position the number of edges of the GraphFace

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

Return the number of vertices of the GraphFace.

Returns:
Position the number of vertices of the GraphFace

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

Similarity operator.

Returns:
bool true

Reimplemented in SASFace, and SESFace.

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

Inequality operator.

Returns:
bool false

Reimplemented in SASFace, and SESFace.

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

Assign from another GraphFace.

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

Parameters:
face the GraphFace object to assign from

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

Equality operator.

Returns:
bool true

Reimplemented in SASFace, and SESFace.

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

Remove an edge from the GraphFace.

Parameters:
edge a pointer to the edge to remove

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

Remove a vertex from the GraphFace.

Parameters:
vertex a pointer to the vertex to remove

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

Assign from another GraphFace.

Parameters:
face the GraphFacee object to assign from
deep if 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.

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

Set the index of the GraphFace.

Parameters:
index the new index

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

Substitute an edge by an other one.

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

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

Substitute a vertex by an other one.

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