Loading...
Searching...
No Matches
BALL::GraphEdge< Vertex, Edge, Face > Class Template Reference
Molecular Modeling » Molecular Structure » Molecular Surface Computation

`#include <BALL/STRUCTURE/graphEdge.h>`

## Public Member Functions

Constructors and Destructors
| GraphEdge ()
| GraphEdge (const GraphEdge< Vertex, Edge, Face > &edge, bool deep=false)
| GraphEdge (Vertex *vertex1, Vertex *vertex2, Face *face1, Face *face2, Index index)
virtual | ~GraphEdge ()
Assignment
void | set (const GraphEdge< Vertex, Edge, Face > &edge, bool deep=false)
GraphEdge< Vertex, Edge, Face > & | operator= (const GraphEdge< Vertex, Edge, Face > &edge)
void | set (Vertex *vertex0, Vertex *vertex1, Face *face0, Face *face1, Index index)
Accessors
void | setVertex (Position i, Vertex *vertex)
Vertex * | getVertex (Position i) const
void | setFace (Position i, Face *face)
Face * | getFace (Position i) const
void | setIndex (Index index)
Index | getIndex () const
Vertex * | other (const Vertex *vertex) const
Face * | other (const Face *face) const
bool | substitute (const Vertex *old_vertex, Vertex *new_vertex)
bool | substitute (const Face *old_vertex, Face *new_vertex)
Face * | remove (const Face *face)
void | revert ()

## Friends

Class friends

- class GraphVertex<Vertex,Edge,Face>;
- class GraphFace<Vertex,Edge,Face>;
- class GraphTriangle<Vertex,Edge,Face>;

class | GraphVertex< Vertex, Edge, Face >
class | GraphFace< Vertex, Edge, Face >
class | GraphTriangle< Vertex, Edge, Face >

## Predicates

Vertex * | vertex_ [2]
Face * | face_ [2]
Index | index_
virtual bool | operator== (const Edge &) const
virtual bool | operator!= (const Edge &) const
virtual bool | operator*= (const Edge &) const

## Detailed Description

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

Generic GraphEdge Class.

Definition at line 30 of file graphEdge.h.

## Constructor & Destructor Documentation

## GraphEdge() [1/3]

template<typename Vertex, typename Edge, typename Face>

BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( |  | ) |

Default constructor. This method creates a new GraphEdge object.

Definition at line 255 of file graphEdge.h.

## GraphEdge() [2/3]

template<typename Vertex, typename Edge, typename Face>

BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( | const GraphEdge< Vertex, Edge, Face > & | edge,
|  | bool | deep = false )

Copy constructor. Create a new GraphEdge object from another.

Parameters

  edge | the GraphEdge object to be copied
  deep | if deep = false, all pointers are set to NULL (default). Otherwise the new GraphEdge object is linked to the neighbours of the old GraphEdge object.

Definition at line 266 of file graphEdge.h.

## GraphEdge() [3/3]

template<typename Vertex, typename Edge, typename Face>

BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( | Vertex * | vertex1,
|  | Vertex * | vertex2,
|  | Face * | face1,
|  | Face * | face2,
|  | Index | index )

Detailled constructor. Create a new GraphEdge object from a lot of nice objects

Parameters

  vertex1 | assigned to the first vertex
  vertex2 | assigned to the second vertex
  face1 | assigned to the first face
  face2 | assigned to the second face
  index | assigned to the index

Definition at line 288 of file graphEdge.h.

## ~GraphEdge()

template<typename Vertex, typename Edge, typename Face>

BALL::GraphEdge< Vertex, Edge, Face >::~GraphEdge | ( |  | ) |

virtual

Destructor. Destructs the GraphEdge object. The neighboured faces and vertices are {/bf not} destructed.

Definition at line 304 of file graphEdge.h.

## Member Function Documentation

## getFace()

template<typename Vertex, typename Edge, typename Face>

Face * BALL::GraphEdge< Vertex, Edge, Face >::getFace | ( | Position | i | ) | const

Return one of the two faces of the GraphEdge.

Parameters

  i |

Returns
  Face* a pointer to the first face if i = 0, a pointer to the second face otherwise

Definition at line 409 of file graphEdge.h.

## getIndex()

template<typename Vertex, typename Edge, typename Face>

Index BALL::GraphEdge< Vertex, Edge, Face >::getIndex | ( |  | ) | const

Return the index of the GraphEdge.

Returns
  Index the index of the GraphEdge

Definition at line 430 of file graphEdge.h.

## getVertex()

template<typename Vertex, typename Edge, typename Face>

Vertex * BALL::GraphEdge< Vertex, Edge, Face >::getVertex | ( | Position | i | ) | const

Return one of the two vertices of the GraphEdge.

Parameters

  i |

Returns
  Vertex* a pointer to the first vertex if i = 0, a pointer to the second vertex otherwise

Definition at line 381 of file graphEdge.h.

## operator!=()

template<typename Vertex, typename Edge, typename Face>

bool BALL::GraphEdge< Vertex, Edge, Face >::operator!= | ( | const Edge & |  | ) | const

virtual

Inequality operator.

Returns
  bool false

Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.

Definition at line 560 of file graphEdge.h.

## operator*=()

template<typename Vertex, typename Edge, typename Face>

bool BALL::GraphEdge< Vertex, Edge, Face >::operator*= | ( | const Edge & |  | ) | const

virtual

Similarity operator.

Returns
  bool true

Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.

Definition at line 567 of file graphEdge.h.

## operator=()

template<typename Vertex, typename Edge, typename Face>

GraphEdge< Vertex, Edge, Face > & BALL::GraphEdge< Vertex, Edge, Face >::operator= | ( | const GraphEdge< Vertex, Edge, Face > & | edge | ) |

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

Parameters

  edge | the GraphEdge object to assign from

Definition at line 335 of file graphEdge.h.

## operator==()

template<typename Vertex, typename Edge, typename Face>

bool BALL::GraphEdge< Vertex, Edge, Face >::operator== | ( | const Edge & |  | ) | const

virtual

Equality operator.

Returns
  bool, true

Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.

Definition at line 553 of file graphEdge.h.

## other() [1/2]

template<typename Vertex, typename Edge, typename Face>

Face * BALL::GraphEdge< Vertex, Edge, Face >::other | ( | const Face * | face | ) | const

Return a pointer to the other face of the GraphEdge. If the given face is not neighboured to the GraphEdge, an exception is thrown.

Parameters

  face | one of the faces of the GraphEdge

Returns
  Face* the other face

Exceptions

  BALL::Exception::GeneralException |

Definition at line 458 of file graphEdge.h.

## other() [2/2]

template<typename Vertex, typename Edge, typename Face>

Vertex * BALL::GraphEdge< Vertex, Edge, Face >::other | ( | const Vertex * | vertex | ) | const

Return a pointer to the other vertex of the GraphEdge. If the given vertex is not incident to the GraphEdge, an exception is thrown.

Parameters

  vertex | one of the vertices of the GraphEdge

Returns
  Vertex* the other vertex

Exceptions

  BALL::Exception::GeneralException |

Definition at line 437 of file graphEdge.h.

## remove()

template<typename Vertex, typename Edge, typename Face>

Face * BALL::GraphEdge< Vertex, Edge, Face >::remove | ( | const Face * | face | ) |

Delete a face of the GraphEdge. If the second face of the GraphEdge should be deleted, it is set to NULL. If the first one should be deleted, the second one is copied to first position and then set to NULL.

Parameters

  face | the face to delete

Returns
  Face* a pointer to the other face

Definition at line 525 of file graphEdge.h.

## revert()

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::revert | ( |  | ) |

Definition at line 544 of file graphEdge.h.

## set() [1/2]

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::set | ( | const GraphEdge< Vertex, Edge, Face > & | edge,
|  | bool | deep = false )

Assign from another GraphEdge.

Parameters

  edge | the GraphEdge object to assign from
  deep | if deep = false, all pointers are set to NULL (default). Otherwise the GraphEdge object is linked to the neighbours of the GraphEdge object to assign from.

Definition at line 310 of file graphEdge.h.

## set() [2/2]

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::set | ( | Vertex * | vertex0,
|  | Vertex * | vertex1,
|  | Face * | face0,
|  | Face * | face1,
|  | Index | index )

Assign from a lot of nice objects

Parameters

  vertex0 | assigned to the first vertex
  vertex1 | assigned to the second vertex
  face0 | assigned to the first face
  face1 | assigned to the second face
  index | assigned to the index

Definition at line 351 of file graphEdge.h.

## setFace()

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::setFace | ( | Position | i,
|  | Face * | face )

Set one of the two faces of the GraphEdge.

Parameters

  i | change the first face, if i = 0, the second otherwise
  face | a pointer to the new face

Definition at line 395 of file graphEdge.h.

## setIndex()

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::setIndex | ( | Index | index | ) |

Set the index of the GraphEdge.

Parameters

  index | the new index

Definition at line 423 of file graphEdge.h.

## setVertex()

template<typename Vertex, typename Edge, typename Face>

void BALL::GraphEdge< Vertex, Edge, Face >::setVertex | ( | Position | i,
|  | Vertex * | vertex )

Set one of the two vertices of the GraphEdge.

Parameters

  i | the first vertex is changed if i = 0, the second otherwise
  vertex | a pointer to the new vertex

Definition at line 367 of file graphEdge.h.

## substitute() [1/2]

template<typename Vertex, typename Edge, typename Face>

bool BALL::GraphEdge< Vertex, Edge, Face >::substitute | ( | const Face * | old_vertex,
|  | Face * | new_vertex )

Substitute a face by an other one.

Parameters

  old_vertex | the face that has to be substituted
  new_vertex | the new face

Returns
  bool true, if the face can be substituted, false otherwise

Definition at line 502 of file graphEdge.h.

## substitute() [2/2]

template<typename Vertex, typename Edge, typename Face>

bool BALL::GraphEdge< Vertex, Edge, Face >::substitute | ( | const Vertex * | old_vertex,
|  | Vertex * | new_vertex )

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

Definition at line 479 of file graphEdge.h.

## Friends And Related Symbol Documentation

## GraphFace< Vertex, Edge, Face >

template<typename Vertex, typename Edge, typename Face>

friend class GraphFace< Vertex, Edge, Face >

friend

Definition at line 567 of file graphEdge.h.

## GraphTriangle< Vertex, Edge, Face >

template<typename Vertex, typename Edge, typename Face>

friend class GraphTriangle< Vertex, Edge, Face >

friend

Definition at line 567 of file graphEdge.h.

## GraphVertex< Vertex, Edge, Face >

template<typename Vertex, typename Edge, typename Face>

friend class GraphVertex< Vertex, Edge, Face >

friend

Definition at line 567 of file graphEdge.h.

## Member Data Documentation

## face_

template<typename Vertex, typename Edge, typename Face>

Face* BALL::GraphEdge< Vertex, Edge, Face >::face_[2]

protected

Definition at line 243 of file graphEdge.h.

## index_

template<typename Vertex, typename Edge, typename Face>

Index BALL::GraphEdge< Vertex, Edge, Face >::index_

protected

Definition at line 246 of file graphEdge.h.

## vertex_

template<typename Vertex, typename Edge, typename Face>

Vertex* BALL::GraphEdge< Vertex, Edge, Face >::vertex_[2]

protected

Definition at line 240 of file graphEdge.h.