20 #include <Information.hpp> 58 template <
class vvgraph,
bool do_checks = true>
60 #ifdef JUST_FOR_DOXYGEN
71 vertex operator()(
const vertex& a,
const vertex& b,
vvgraph& S)
const 77 unsigned int check = 0;
85 Information::err <<
"Warning: Attempt to insert a vertex between vertices that have no relation." << endl;
89 Information::err <<
"Warning: Attempt to insert a vertex between vertices that have an assymetric relation." 114 const vertex& operator()(
const vertex& a,
const vertex& b,
vvgraph& S)
const 117 const vertex& r = *S.
insert(x);
129 template <
typename VertexContent,
typename EdgeContent,
typename Alloc>
136 static const Insert fct = Insert();
144 template <
class Graph>
145 typename Graph::edge_t
insertAfter(
const typename Graph::vertex_t& v,
const typename Graph::vertex_t& ref,
146 const typename Graph::vertex_t& nv, Graph& S)
149 return S.spliceAfter(v, ref, nv);
150 return S.insertEdge(v, nv);
157 template <
class Graph>
158 typename Graph::edge_t
insertBefore(
const typename Graph::vertex_t& v,
const typename Graph::vertex_t& ref,
159 const typename Graph::vertex_t& nv, Graph& S)
162 return S.spliceBefore(v, ref, nv);
163 return S.insertEdge(v, nv);
edge_t insertEdge(const vertex_t &src, const vertex_t &tgt)
Insert a new edge in the graph, without ordering.
Definition: VVGraph.hpp:2045
edge_t replace(const vertex_t &v, const vertex_t &neighbor, const vertex_t &new_neighbor)
Replace a vertex by another in a neighborhood.
Definition: VVGraph.hpp:1904
vvgraph::vertex_t vertex
Type of a vertex.
Definition: Mesh.hpp:49
Insert a new vertex on an edge.
Definition: Insert.hpp:59
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
Vertex of a vv graph.
Definition: Vertex.hpp:67
Define the STATIC_ASSERT macro.
Contain the definition of the VVGraph template class.
Graph::edge_t 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.
Definition: Insert.hpp:140
bool isNull() const
Test if a vertex is a null vertex.
Definition: Vertex.hpp:284
iterator insert(const vertex_t &v)
Insert a new vertex in the graph.
Definition: VVGraph.hpp:1595
Graph::edge_t 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.
Definition: Insert.hpp:153
edge_t edge(const vertex_t &src, const vertex_t &tgt)
Returns the edge from src to tgt.
Definition: VVGraph.hpp:1964