MorphoGraphX
Classes | Namespaces | Functions
Insert.hpp File Reference

Defines the algorithms::Insert class template. More...

#include <Config.hpp>
#include <Information.hpp>
#include <StaticAssert.hpp>
#include <VVGraph.hpp>
#include <utility>

Go to the source code of this file.

Classes

class  mgx::util::Insert< vvgraph, do_checks >
 Insert a new vertex on an edge. More...
 
class  mgx::util::Insert< vvgraph, true >
 
class  mgx::util::Insert< vvgraph, false >
 

Namespaces

 mgx
 This namespace contains all the API of MorphoGraphX.
 

Functions

template<typename VertexContent , typename EdgeContent , typename Alloc >
const graph::VVGraph< VertexContent, EdgeContent, Alloc >::vertex_t & mgx::util::insert (const typename graph::VVGraph< VertexContent, EdgeContent, Alloc >::vertex_t &a, const typename graph::VVGraph< VertexContent, EdgeContent, Alloc >::vertex_t &b, graph::VVGraph< VertexContent, EdgeContent, Alloc > &S)
 
template<class Graph >
Graph::edge_t mgx::util::insertAfter (const typename Graph::vertex_t &v, const typename Graph::vertex_t &ref, const typename Graph::vertex_t &nv, Graph &S)
 Splice nv after ref in v if ref is not null. More...
 
template<class Graph >
Graph::edge_t mgx::util::insertBefore (const typename Graph::vertex_t &v, const typename Graph::vertex_t &ref, const typename Graph::vertex_t &nv, Graph &S)
 Splice nv before ref in v if ref is not null. More...
 

Detailed Description

Defines the algorithms::Insert class template.

Function Documentation

template<class Graph >
Graph::edge_t mgx::util::insertAfter ( const typename Graph::vertex_t &  v,
const typename Graph::vertex_t &  ref,
const typename Graph::vertex_t &  nv,
Graph &  S 
)

Splice nv after ref in v if ref is not null.

Otherwise just insert the edge (v,nv) in S.

template<class Graph >
Graph::edge_t mgx::util::insertBefore ( const typename Graph::vertex_t &  v,
const typename Graph::vertex_t &  ref,
const typename Graph::vertex_t &  nv,
Graph &  S 
)

Splice nv before ref in v if ref is not null.

Otherwise just insert the edge (v,nv) in S.