CMR  1.3.0
Namespaces | Functions
tu::util Namespace Reference

Namespaces

 detail
 

Functions

template<typename Graph >
void reconnect_edge_target (Graph &graph, typename boost::graph_traits< Graph >::edge_descriptor edge, typename boost::graph_traits< Graph >::vertex_descriptor old_vertex, typename boost::graph_traits< Graph >::vertex_descriptor new_vertex)
 
template<typename Graph >
void reconnect_edge_source (Graph &graph, typename boost::graph_traits< Graph >::edge_descriptor edge, typename boost::graph_traits< Graph >::vertex_descriptor old_vertex, typename boost::graph_traits< Graph >::vertex_descriptor new_vertex)
 
template<typename Graph >
void reconnect_edge (Graph &graph, typename boost::graph_traits< Graph >::edge_descriptor edge, typename boost::graph_traits< Graph >::vertex_descriptor old_vertex, typename boost::graph_traits< Graph >::vertex_descriptor new_vertex)
 
template<typename Graph , typename IndexMap , typename VertexSequence >
bool is_path (const Graph &graph, const IndexMap index_map, VertexSequence &path)
 
template<typename Graph , typename IndexMap >
bool is_path (const Graph &graph, const IndexMap index_map)
 
template<typename Graph >
bool is_path (const Graph &g)
 
template<typename Graph , typename IndexMap , typename Vertex >
bool find_star_vertex (const Graph &graph, const IndexMap index_map, Vertex &vertex)
 
template<typename Graph , typename Vertex >
bool find_star_vertex (const Graph &graph, Vertex &vertex)
 
template<typename Graph , typename IndexMap >
bool is_star (const Graph &graph, const IndexMap index_map)
 
template<typename Graph >
bool is_star (const Graph &graph)
 
template<typename Graph , typename VertexSet >
void used_vertices (const Graph &graph, VertexSet &vertex_set)
 

Function Documentation

◆ find_star_vertex() [1/2]

template<typename Graph , typename IndexMap , typename Vertex >
bool tu::util::find_star_vertex ( const Graph &  graph,
const IndexMap  index_map,
Vertex &  vertex 
)

Tests, if a given graph is a star and stores the central vertex.

Parameters
graphA given graph
index_mapAn index map for this graph
vertexReturns the central vertex
Returns
true if and only if the graph is a star

◆ find_star_vertex() [2/2]

template<typename Graph , typename Vertex >
bool tu::util::find_star_vertex ( const Graph &  graph,
Vertex &  vertex 
)

Tests, if a given graph is a star and stores the central vertex. The graph must have an index map attached.

Parameters
graphA given graph
vertexReturns the central vertex
Returns
true if and only if the graph is a star

◆ is_path() [1/3]

template<typename Graph >
bool tu::util::is_path ( const Graph &  g)

Tests, if a given graph is a path. The graph must have an index map attached.

Parameters
graphA given graph
Returns
true if and only if this graph is a path

◆ is_path() [2/3]

template<typename Graph , typename IndexMap >
bool tu::util::is_path ( const Graph &  graph,
const IndexMap  index_map 
)

Tests, if a given graph is a path.

Parameters
graphA given graph
index_mapAn index map for this graph
Returns
true if and only if this graph is a path

◆ is_path() [3/3]

template<typename Graph , typename IndexMap , typename VertexSequence >
bool tu::util::is_path ( const Graph &  graph,
const IndexMap  index_map,
VertexSequence &  path 
)

Tests, if a given graph is a path and stores the vertices in order into a given sequence.

Parameters
graphA given graph
index_mapAn index map for this graph
pathThe resulting sequence of nodes in order
Returns
true if and only if this graph is a path

Call breadth first search

◆ is_star() [1/2]

template<typename Graph >
bool tu::util::is_star ( const Graph &  graph)

Tests, if a given graph is a star and stores the central vertex. The graph must have an index map attached.

Parameters
graphA given graph
Returns
true if and only if the graph is a star

◆ is_star() [2/2]

template<typename Graph , typename IndexMap >
bool tu::util::is_star ( const Graph &  graph,
const IndexMap  index_map 
)

Tests, if a given graph is a star.

Parameters
graphA given graph
index_mapAn index map for this graph
Returns
true if and only if the graph is a star

◆ reconnect_edge()

template<typename Graph >
void tu::util::reconnect_edge ( Graph &  graph,
typename boost::graph_traits< Graph >::edge_descriptor  edge,
typename boost::graph_traits< Graph >::vertex_descriptor  old_vertex,
typename boost::graph_traits< Graph >::vertex_descriptor  new_vertex 
)

Reconnects an edge in a graph, retaining the edge property, by replacing a given old vertex by a new one.

Parameters
graphThe given graph
edgeAn edge in the graph
old_vertexOne of the vertices of the edge
new_vertexAnother vertex in the graph, which should replace the old vertex

◆ reconnect_edge_source()

template<typename Graph >
void tu::util::reconnect_edge_source ( Graph &  graph,
typename boost::graph_traits< Graph >::edge_descriptor  edge,
typename boost::graph_traits< Graph >::vertex_descriptor  old_vertex,
typename boost::graph_traits< Graph >::vertex_descriptor  new_vertex 
)

Reconnects an edge in a graph, retaining the edge property, by replacing the target vertex.

Parameters
graphA given graph
edgeAn edge in the graph
old_vertexOne of the vertices of the edge
new_vertexAnother vertex in the graph, the edge should have as source

◆ reconnect_edge_target()

template<typename Graph >
void tu::util::reconnect_edge_target ( Graph &  graph,
typename boost::graph_traits< Graph >::edge_descriptor  edge,
typename boost::graph_traits< Graph >::vertex_descriptor  old_vertex,
typename boost::graph_traits< Graph >::vertex_descriptor  new_vertex 
)

Reconnects an edge in a graph, retaining the edge property, by replacing the target vertex.

Parameters
graphA given graph
edgeAn edge in the graph
old_vertexOne of the vertices of the edge
new_vertexAnother vertex in the graph, the edge should have as target

◆ used_vertices()

template<typename Graph , typename VertexSet >
void tu::util::used_vertices ( const Graph &  graph,
VertexSet &  vertex_set 
)

Collects the non-isolated vertices of a given graph.

Parameters
graphA given graph
vertex_setA set to be filled with all vertices that are in an edge