MorphoGraphX  2.0-1-227
Public Types | Public Member Functions | List of all members
mgx::Insert< vvGraph > Class Template Reference

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

#include <Insert.hpp>

Public Types

typedef vvGraph::vertex_t vertex
 

Public Member Functions

vertex operator() (const vertex &a, const vertex &b, vvGraph &S) const
 

Detailed Description

template<class vvGraph>
class mgx::Insert< vvGraph >

Insert a new vertex on an edge.

Parameters
aan existing vertex
ban exsisting vertex
Sthe vv graph to edit

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

Example:

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 57 of file Insert.hpp.

Member Typedef Documentation

◆ vertex

template<class vvGraph >
typedef vvGraph::vertex_t mgx::Insert< vvGraph >::vertex

Definition at line 59 of file Insert.hpp.

Member Function Documentation

◆ operator()()

template<class vvGraph >
vertex mgx::Insert< vvGraph >::operator() ( const vertex a,
const vertex b,
vvGraph S 
) const
inline

Definition at line 61 of file Insert.hpp.


The documentation for this class was generated from the following file:
mgx::insert
const VVGraph< VertexContent, EdgeContent >::vertex_t & insert(const typename VVGraph< VertexContent, EdgeContent >::vertex_t &a, const typename VVGraph< VertexContent, EdgeContent >::vertex_t &b, VVGraph< VertexContent, EdgeContent > &S)
Definition: Insert.hpp:102
mgx::vvGraph
VVGraph< VertexData, EdgeData > vvGraph
Simpler names for the various containers and iterators related to vertices and VV.
Definition: Misc.hpp:47
mgx::Insert::vertex
vvGraph::vertex_t vertex
Definition: Insert.hpp:59