#include <BALL/STRUCTURE/graphFace.h>
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 |
Vertex * | has (Vertex *vertex) const |
Edge * | has (Edge *edge) const |
External Iterators | |
VertexIterator | beginVertex () |
ConstVertexIterator | beginVertex () const |
VertexIterator | endVertex () |
ConstVertexIterator | endVertex () const |
EdgeIterator | beginEdge () |
ConstEdgeIterator | beginEdge () const |
EdgeIterator | endEdge () |
ConstEdgeIterator | endEdge () const |
Protected Attributes | |
External Iterators | |
std::list< Vertex * > | vertex_ |
std::list< Edge * > | edge_ |
Index | index_ |
Friends | |
Class friends | |
| |
class | GraphVertex< Vertex, Edge, Face > |
class | GraphEdge< Vertex, Edge, Face > |
Generic GraphFace Class.
typedef std::list<Edge*>::const_iterator BALL::GraphFace< Vertex, Edge, Face >::ConstEdgeIterator |
typedef std::list<Vertex*>::const_iterator BALL::GraphFace< Vertex, Edge, Face >::ConstVertexIterator |
typedef std::list<Edge*>::iterator BALL::GraphFace< Vertex, Edge, Face >::EdgeIterator |
typedef std::list<Vertex*>::iterator BALL::GraphFace< Vertex, Edge, Face >::VertexIterator |
BALL::GraphFace< Vertex, Edge, Face >::GraphFace | ( | ) | [inline] |
Default constructor. This method creates a new GraphFace object.
BALL::GraphFace< Vertex, Edge, Face >::GraphFace | ( | const GraphFace< Vertex, Edge, Face > & | face, | |
bool | deep = false | |||
) | [inline] |
Copy constructor. Create a new GraphFace object from another.
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. |
References BALL::GraphFace< Vertex, Edge, Face >::edge_, and BALL::GraphFace< Vertex, Edge, Face >::vertex_.
BALL::GraphFace< Vertex, Edge, Face >::~GraphFace | ( | ) | [inline, virtual] |
Destructor. Destructs the GraphFace object.
GraphFace< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphFace< Vertex, Edge, Face >::beginEdge | ( | ) | const [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
GraphFace< Vertex, Edge, Face >::EdgeIterator BALL::GraphFace< Vertex, Edge, Face >::beginEdge | ( | ) | [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
GraphFace< Vertex, Edge, Face >::ConstVertexIterator BALL::GraphFace< Vertex, Edge, Face >::beginVertex | ( | ) | const [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
GraphFace< Vertex, Edge, Face >::VertexIterator BALL::GraphFace< Vertex, Edge, Face >::beginVertex | ( | ) | [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
GraphFace< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphFace< Vertex, Edge, Face >::endEdge | ( | ) | const [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
GraphFace< Vertex, Edge, Face >::EdgeIterator BALL::GraphFace< Vertex, Edge, Face >::endEdge | ( | ) | [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
GraphFace< Vertex, Edge, Face >::ConstVertexIterator BALL::GraphFace< Vertex, Edge, Face >::endVertex | ( | ) | const [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
GraphFace< Vertex, Edge, Face >::VertexIterator BALL::GraphFace< Vertex, Edge, Face >::endVertex | ( | ) | [inline] |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
bool BALL::GraphFace< Vertex, Edge, Face >::getEdge | ( | const Vertex * | vertex1, | |
const Vertex * | vertex2, | |||
Edge *& | edge | |||
) | const [inline] |
Find the edge of the GraphFace that belongs to the two given vertices
vertex1 | a pointer to the first given vertex | |
vertex2 | a pointer to the second given vertex | |
edge | a pointer to the found edge |
bool BALL::GraphFace< Vertex, Edge, Face >::getEdges | ( | const Vertex * | vertex, | |
Edge *& | edge1, | |||
Edge *& | edge2 | |||
) | const [inline] |
Find the two edges of the GraphFace that belong to the given vertex
vertex | a pointer to the given vertex | |
edge1 | a pointer to the first found edge | |
edge2 | a pointer to the second found edge |
Index BALL::GraphFace< Vertex, Edge, Face >::getIndex | ( | ) | const [inline] |
Return the index of the GraphFace.
References BALL::GraphFace< Vertex, Edge, Face >::index_.
Edge * BALL::GraphFace< Vertex, Edge, Face >::getSimilarEdge | ( | const Edge * | edge | ) | const [inline] |
Find the edge of the GraphFace that is similar to the given edge.
edge | a pointer to the given edge |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
Edge * BALL::GraphFace< Vertex, Edge, Face >::has | ( | Edge * | edge | ) | const [inline] |
Test whether an edge is meber of the face.
edge | a pointer to the edge to test |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
Vertex * BALL::GraphFace< Vertex, Edge, Face >::has | ( | Vertex * | vertex | ) | const [inline] |
Test whether a vertex is meber of the face.
vertex | a pointer to the the vertex to test |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
void BALL::GraphFace< Vertex, Edge, Face >::insert | ( | Edge * | edge | ) | [inline] |
Insert a new edge to the GraphFace.
edge | a pointer to the new edge |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
void BALL::GraphFace< Vertex, Edge, Face >::insert | ( | Vertex * | vertex | ) | [inline] |
Insert a new vertex to the GraphFace.
vertex | a pointer to the new vertex |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
Position BALL::GraphFace< Vertex, Edge, Face >::numberOfEdges | ( | ) | const [inline] |
Return the number of edges of the GraphFace.
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
Position BALL::GraphFace< Vertex, Edge, Face >::numberOfVertices | ( | ) | const [inline] |
Return the number of vertices of the GraphFace.
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
bool BALL::GraphFace< Vertex, Edge, Face >::operator!= | ( | const Face & | face | ) | const [inline, virtual] |
bool BALL::GraphFace< Vertex, Edge, Face >::operator*= | ( | const Face & | face | ) | const [inline, virtual] |
GraphFace< Vertex, Edge, Face > & BALL::GraphFace< Vertex, Edge, Face >::operator= | ( | const GraphFace< Vertex, Edge, Face > & | face | ) | [inline] |
Assign from another GraphFace. The GraphFace object is linked to the neighbours of the GraphFace object to assign from.
face | 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_.
bool BALL::GraphFace< Vertex, Edge, Face >::operator== | ( | const Face & | face | ) | const [inline, virtual] |
void BALL::GraphFace< Vertex, Edge, Face >::remove | ( | Edge * | edge | ) | [inline] |
Remove an edge from the GraphFace.
edge | a pointer to the edge to remove |
References BALL::GraphFace< Vertex, Edge, Face >::edge_.
void BALL::GraphFace< Vertex, Edge, Face >::remove | ( | Vertex * | vertex | ) | [inline] |
Remove a vertex from the GraphFace.
vertex | a pointer to the vertex to remove |
References BALL::GraphFace< Vertex, Edge, Face >::vertex_.
void BALL::GraphFace< Vertex, Edge, Face >::set | ( | const GraphFace< Vertex, Edge, Face > & | face, | |
bool | deep = false | |||
) | [inline] |
Assign from another GraphFace.
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. |
References BALL::GraphFace< Vertex, Edge, Face >::edge_, BALL::GraphFace< Vertex, Edge, Face >::index_, and BALL::GraphFace< Vertex, Edge, Face >::vertex_.
void BALL::GraphFace< Vertex, Edge, Face >::setIndex | ( | Index | index | ) | [inline] |
Set the index of the GraphFace.
index | the new index |
References BALL::GraphFace< Vertex, Edge, Face >::index_.
bool BALL::GraphFace< Vertex, Edge, Face >::substitute | ( | const Edge * | old_edge, | |
Edge * | new_edge | |||
) | [inline] |
Substitute an edge by an other one.
old_edge | the edge that has to be substituted | |
new_edge | the new edge |
bool BALL::GraphFace< Vertex, Edge, Face >::substitute | ( | const Vertex * | old_vertex, | |
Vertex * | new_vertex | |||
) | [inline] |
Substitute a vertex by an other one.
old_vertex | the vertex that has to be substituted | |
new_vertex | the new vertex |
friend class GraphEdge< Vertex, Edge, Face > [friend] |
friend class GraphVertex< Vertex, Edge, Face > [friend] |
std::list<Edge*> BALL::GraphFace< Vertex, Edge, Face >::edge_ [protected] |
Referenced by BALL::GraphFace< Vertex, Edge, Face >::beginEdge(), BALL::GraphFace< Vertex, Edge, Face >::endEdge(), BALL::GraphFace< Vertex, Edge, Face >::getSimilarEdge(), BALL::GraphFace< Vertex, Edge, Face >::GraphFace(), BALL::GraphFace< Vertex, Edge, Face >::has(), BALL::GraphFace< Vertex, Edge, Face >::insert(), BALL::GraphFace< Vertex, Edge, Face >::numberOfEdges(), BALL::GraphFace< Vertex, Edge, Face >::operator=(), BALL::GraphFace< Vertex, Edge, Face >::remove(), and BALL::GraphFace< Vertex, Edge, Face >::set().
Index BALL::GraphFace< Vertex, Edge, Face >::index_ [protected] |
std::list<Vertex*> BALL::GraphFace< Vertex, Edge, Face >::vertex_ [protected] |
Referenced by BALL::GraphFace< Vertex, Edge, Face >::beginVertex(), BALL::GraphFace< Vertex, Edge, Face >::endVertex(), BALL::GraphFace< Vertex, Edge, Face >::GraphFace(), BALL::GraphFace< Vertex, Edge, Face >::has(), BALL::GraphFace< Vertex, Edge, Face >::insert(), BALL::GraphFace< Vertex, Edge, Face >::numberOfVertices(), BALL::GraphFace< Vertex, Edge, Face >::operator=(), BALL::GraphFace< Vertex, Edge, Face >::remove(), and BALL::GraphFace< Vertex, Edge, Face >::set().