algorithms::Insert< vvgraph, do_checks > Class Template Reference

Insert a new vertex on an edge. More...

#include <algorithms/insert.h>


Detailed Description

template<class vvgraph, bool do_checks = true>
class algorithms::Insert< vvgraph, do_checks >

Insert a new vertex on an edge.

Parameters:
a an existing vertex
b an exsisting vertex
S the vv graph to edit

This function creates a new vertex and inserts it between two existing vertices by replacing it into the existing neighbourhoods. If the vertices have no relation or an assymmetric relation, a warning is printed to stderr and an empty vertex is returned.

Example:

 vvgraph S;
 vertex v1, v2;
 S.insert(v1);
 S.insert(v2);
 S.insertEdge(v1,v2);
 S.insertEdge(v2,v1);
 Insert<vvgraph> insert;
 vertex v = insert(v1, v2, S);

The pre-condition is that edges (v1,v2) and (v2,v1) exist.

The post-condition is that v replaced v2 in the neighborhood of v1 and v1 in the neighborhood of v2, keeping the double connections.

Definition at line 50 of file insert.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:38:04 2013 for VVE by  doxygen 1.6.3