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

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

Generic GraphVertex Class. More...

#include <graphVertex.h>

List of all members.

Public Types

Type definitions
typedef HashSet< Edge
* >::Iterator 
EdgeIterator
typedef HashSet< Edge
* >::ConstIterator 
ConstEdgeIterator
typedef HashSet< Face
* >::Iterator 
FaceIterator
typedef HashSet< Face
* >::ConstIterator 
ConstFaceIterator

Public Member Functions

Constructors and Destructors
 GraphVertex () throw ()
 Default constructor.
 GraphVertex (const GraphVertex< Vertex, Edge, Face > &vertex, bool deep=false) throw ()
 Copy constructor.
virtual ~GraphVertex () throw ()
 Destructor.
Assignment
void set (const GraphVertex< Vertex, Edge, Face > &vertex, bool deep=false) throw ()
 Assign from another GraphVertex.
GraphVertex< Vertex, Edge,
Face > & 
operator= (const GraphVertex< Vertex, Edge, Face > &vertex) throw ()
 Assign from another GraphVertex.
Accessors
void insert (Edge *edge) throw ()
 Insert a new edge into the HashSet of edges the GraphVertex belongs to.
void insert (Face *face) throw ()
 Insert a new face into the HashSet of faces the GraphVertex belongs to.
void remove (Edge *edge) throw ()
 Remove an edge from the HashSet of edges the GraphVertex belongs to.
void remove (Face *face) throw ()
 Remove a face from the HashSet of faces the GraphVertex belongs to.
Position numberOfEdges () const throw ()
 Return the number of edges the GraphVertex belongs to.
Position numberOfFaces () const throw ()
 Return the number of faces the GraphVertex belongs to.
void setIndex (Index index) throw ()
 Set the index of the vertex.
Index getIndex () const throw ()
 Return the index of the vertex.
bool join (const Vertex &vertex) throw ()
 Join two GraphVertices if they are similar.
bool substitute (Vertex *vertex) throw ()
 Subsitute the GraphVertex by a similar one.
Predicates
virtual bool operator== (const Vertex &) const throw ()
 Equality operator.
virtual bool operator!= (const Vertex &) const throw ()
 Inequality operator.
virtual bool operator *= (const Vertex &) const throw ()
 Similarity operator.
Face * has (Face *face) const throw ()
 Test whether the vertex is meber of a given face.
Edge * has (Edge *edge) const throw ()
 Test whether the vertex is meber of a given edge.
bool hasEdges () const throw ()
 Test whether the vertex has edges.
bool hasFaces () const throw ()
 Test whether the vertex has faces.
External Iterators
EdgeIterator beginEdge () throw ()
ConstEdgeIterator beginEdge () const throw ()
EdgeIterator endEdge () throw ()
ConstEdgeIterator endEdge () const throw ()
FaceIterator beginFace () throw ()
ConstFaceIterator beginFace () const throw ()
FaceIterator endFace () throw ()
ConstFaceIterator endFace () const throw ()

Protected Attributes

HashSet< Edge * > edges_
HashSet< Face * > faces_
Index index_

Friends

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


class GraphEdge<Vertex,Edge,Face>
class GraphFace<Vertex,Edge,Face>
class GraphTriangle<Vertex,Edge,Face>


Detailed Description

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

Generic GraphVertex Class.


Constructor & Destructor Documentation

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

Default constructor.

This method creates a new GraphVertex object.

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

Copy constructor.

Create a new GraphVertex object from another.

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

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

Destructor.

Destructs the GraphVertex object.


Member Function Documentation

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

Return the index of the vertex.

Returns:
Index the index of the vertex

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

Test whether the vertex is meber of a given edge.

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

template<typename Vertex, typename Edge, typename Face>
Face * GraphVertex< Vertex, Edge, Face >::has Face *  face  )  const throw ()
 

Test whether the vertex is meber of a given face.

Parameters:
face a pointer to the the face to be tested
Returns:
Face* a pointer to the face if it exists, otherwise NULL

template<typename Vertex, typename Edge, typename Face>
bool GraphVertex< Vertex, Edge, Face >::hasEdges  )  const throw ()
 

Test whether the vertex has edges.

template<typename Vertex, typename Edge, typename Face>
bool GraphVertex< Vertex, Edge, Face >::hasFaces  )  const throw ()
 

Test whether the vertex has faces.

template<typename Vertex, typename Edge, typename Face>
void GraphVertex< Vertex, Edge, Face >::insert Face *  face  )  throw ()
 

Insert a new face into the HashSet of faces the GraphVertex belongs to.

Parameters:
face a pointer to the new face

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

Insert a new edge into the HashSet of edges the GraphVertex belongs to.

Parameters:
edge a pointer to the new edge

template<typename Vertex, typename Edge, typename Face>
bool GraphVertex< Vertex, Edge, Face >::join const Vertex vertex  )  throw ()
 

Join two GraphVertices if they are similar.

All edges and faces of the given Vertex are inserted.

Parameters:
vertex the Vertex to join with
Returns:
bool true if the vertices can be joined, false otherwise

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

Return the number of edges the GraphVertex belongs to.

Returns:
Position the number of edges the GraphVertex belongs to

template<typename Vertex, typename Edge, typename Face>
Position GraphVertex< Vertex, Edge, Face >::numberOfFaces  )  const throw ()
 

Return the number of faces the GraphVertex belongs to.

Returns:
Position the number of faces the GraphVertex belongs to

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

Similarity operator.

Returns:
bool true

Reimplemented in RSVertex, SASVertex, SESVertex, and TrianglePoint.

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

Inequality operator.

Returns:
bool false

Reimplemented in RSVertex, SASVertex, SESVertex, and TrianglePoint.

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

Assign from another GraphVertex.

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

Parameters:
vertex the GraphVertex object to assign from

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

Equality operator.

Returns:
bool true

Reimplemented in RSVertex, SASVertex, SESVertex, and TrianglePoint.

template<typename Vertex, typename Edge, typename Face>
void GraphVertex< Vertex, Edge, Face >::remove Face *  face  )  throw ()
 

Remove a face from the HashSet of faces the GraphVertex belongs to.

Parameters:
face a pointer to the face to remove

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

Remove an edge from the HashSet of edges the GraphVertex belongs to.

Parameters:
edge a pointer to the edge to remove

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

Assign from another GraphVertex.

Parameters:
vertex the GraphVertex object to assign from
deep if deep = false, all pointers are set to NULL (default). Otherwise the GraphVertex object is linked to the neighbours of the GraphVertex object to assign from.

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

Set the index of the vertex.

Parameters:
index the new index

template<typename Vertex, typename Edge, typename Face>
bool GraphVertex< Vertex, Edge, Face >::substitute Vertex vertex  )  throw ()
 

Subsitute the GraphVertex by a similar one.

The GraphVertex is substituted in all his Edges and Faces.

Parameters:
vertex a pointer to the vertex to substitute
Returns:
bool true if the vertex can be substituted, false otherwise